From d17e54be9ffbbb3b126cb25ad636664f8bcb7a67 Mon Sep 17 00:00:00 2001 From: xc Date: Thu, 23 Oct 2025 14:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/afvue/src/assets/main.css | 38 ++++++++++++++++++++++++++++ vue/afvue/src/views/Sfilecompare.vue | 34 +++++++++++++++---------- 2 files changed, 59 insertions(+), 13 deletions(-) diff --git a/vue/afvue/src/assets/main.css b/vue/afvue/src/assets/main.css index 39f10d1..2e8fab8 100644 --- a/vue/afvue/src/assets/main.css +++ b/vue/afvue/src/assets/main.css @@ -87,4 +87,42 @@ a, } .tb-php{ background-position: 0px -852px; +} +/* +对话框 +*/ +.dialog{ + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + float: left; + left: 0; + top: 0; + position: fixed; + animation: fadeOut 3s ease-in-out forwards; +} +.dialog .alert{ + position: fixed; + top: 50%; + left: 50%; + transform: translateX(-50%); + padding: 10px 20px; + border-radius: 5px; + z-index: 9999; + /* 3s后消失 */ + animation: fadeOut 3s ease-in-out forwards; +} +/** 同步成功提示 3s后消失*/ +.alert-success{ + /* display: none; */ + background-color: #aee9bc; + color: #fff; +} +@keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } } \ No newline at end of file diff --git a/vue/afvue/src/views/Sfilecompare.vue b/vue/afvue/src/views/Sfilecompare.vue index 88428c7..1519628 100644 --- a/vue/afvue/src/views/Sfilecompare.vue +++ b/vue/afvue/src/views/Sfilecompare.vue @@ -92,7 +92,7 @@ -
+
同步成功!
@@ -124,8 +124,7 @@ export default { isMenuVisible: false, // 菜单是否可见 menuTop: 0, // 菜单顶部位置 menuLeft: 0, // 菜单左侧位置 - - + dialogShow: false, // 对话框是否可见 isShowDir: false, // 只显示目录 } }, @@ -344,16 +343,25 @@ export default { // build to schema const pdata = new URLSearchParams(data) // - // SendZipFile(pdata).then(res=>{ - // console.log(res,"res") - // console.log(res.data.reply,"pdata") - // // 清空数组 - // this.selectedFiles = [] - // // 清空pdata - // pdata.forEach((value, key) => { - // pdata.delete(key) - // }) - // }) + SendZipFile(pdata).then(res=>{ + console.log(res,"res") + // alert(res.status) + if(res.status == "200"){ + // 显示对话框 + this.dialogShow = true + // 3s后隐藏 + setTimeout(() => { + this.dialogShow = false + }, 3000); + } + // alert(res.data.reply) + // 清空数组 + this.selectedFiles = [] + // 清空pdata + pdata.forEach((value, key) => { + pdata.delete(key) + }) + }) return },