From 0ab037a9db386c8a178734df1df621426a677c13 Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Fri, 22 Aug 2025 16:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dateUpdate/index.vue | 1286 ++++++++++++++++++++----- src/pages/devicesSearch/ocrSearch.vue | 14 +- src/services/wsMaInfo/wsMaInfo.js | 4 +- 3 files changed, 1045 insertions(+), 259 deletions(-) diff --git a/src/pages/dateUpdate/index.vue b/src/pages/dateUpdate/index.vue index 6340494..53f1b95 100644 --- a/src/pages/dateUpdate/index.vue +++ b/src/pages/dateUpdate/index.vue @@ -1,89 +1,161 @@ + // 输入框样式 + .uni-easyinput { + .uni-easyinput__content { + background-color: #f7f8fa; + border: 2rpx solid #e8e8e8; + border-radius: 12rpx; + height: 88rpx; + padding: 0 24rpx; + transition: all 0.3s ease; + + &:focus-within { + border-color: #3784fb; + box-shadow: 0 0 0 2rpx rgba(55, 132, 251, 0.1); + } + + .uni-easyinput__content-input { + font-size: 28rpx; + height: 88rpx; + line-height: 88rpx; + color: #262626; + } + } + } + } + } + } + + // 底部按钮 + .btn { + position: fixed; + bottom: 0; + left: 0; + width: calc(100% - 20px); + background-color: #fff; /* 可根据需要设定背景色 */ + padding: 10px; + box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* 可选:添加顶部阴影 */ + display: flex; + justify-content: center; /* 水平居中 */ + gap: 10px; /* 按钮间距 */ + + .btn-cont { + flex: 1; + height: 88rpx; + line-height: 88rpx; + text-align: center; + background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%); + color: #fff; + border-radius: 44rpx; + font-size: 32rpx; + font-weight: 600; + box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2); + transition: all 0.3s ease; + + &:active { + transform: scale(0.98); + opacity: 0.9; + box-shadow: 0 2rpx 8rpx rgba(55, 132, 251, 0.2); + } + + // 清空按钮样式 + &:first-child { + background: #fff; + color: #3784fb; + border: 2rpx solid #3784fb; + box-shadow: none; + + &:active { + background: #f7f8fa; + } + } + } + } +} + +/* 相机相关样式 */ +.camera-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #000; + z-index: 9999; + display: flex; + flex-direction: column; +} + +.viewfinder-container { + position: absolute; + width: 100%; + height: 40%; + margin-top: 150px; + z-index: 10001; +} + +.bottom-controls { + position: absolute; + bottom: 100rpx; + left: 0; + right: 0; + display: flex; + justify-content: space-around; + align-items: center; + width: 100%; + padding: 0 60rpx; + z-index: 3; +} + +.control-btn { + width: 100rpx; + height: 100rpx; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + border: 2rpx solid rgba(255, 255, 255, 0.3); + margin: 0 20rpx; +} + +.control-icon { + color: #fff; + font-size: 40rpx; + font-weight: bold; +} + +.photo-btn { + width: 140rpx; + height: 140rpx; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + border: 6rpx solid rgba(255, 255, 255, 0.5); + transition: all 0.2s ease; + margin: 0 20rpx; +} + +.photo-btn.taking { + transform: scale(0.9); + background-color: rgba(75, 142, 255, 0.8); +} + +.photo-btn.disabled { + opacity: 0.5; + background-color: rgba(255, 255, 255, 0.1); +} + +.photo-btn-inner { + width: 100rpx; + height: 100rpx; + background-color: rgba(255, 255, 255, 0.9); + border-radius: 50%; + transition: all 0.2s ease; +} + +.photo-btn.taking .photo-btn-inner { + background-color: #4b8eff; +} + +.photo-btn.disabled .photo-btn-inner { + background-color: #ccc; +} + +.loading-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 100; + pointer-events: auto; +} + +.loading-content { + display: flex; + flex-direction: column; + align-items: center; + background-color: rgba(255, 255, 255, 0.9); + padding: 60rpx; + border-radius: 20rpx; +} + +.loading-spinner { + width: 60rpx; + height: 60rpx; + border: 6rpx solid #f3f3f3; + border-top: 6rpx solid #4b8eff; + border-radius: 50%; + animation: spin 1s linear infinite; + margin-bottom: 30rpx; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.loading-text { + color: #333; + font-size: 32rpx; + font-weight: bold; +} + +.custom-toast { + position: fixed; + left: 0; + right: 0; + padding: 12px; + background: rgba(0, 0, 0, 0.7); + color: white; + text-align: center; + z-index: 9999; + opacity: 0; + transition: opacity 0.3s; +} +.custom-toast.top { top: 0; } +.custom-toast.bottom { bottom: 0; } +.custom-toast.show { opacity: 1; } + \ No newline at end of file diff --git a/src/pages/devicesSearch/ocrSearch.vue b/src/pages/devicesSearch/ocrSearch.vue index 15c61d8..e29a35d 100644 --- a/src/pages/devicesSearch/ocrSearch.vue +++ b/src/pages/devicesSearch/ocrSearch.vue @@ -143,7 +143,9 @@ - + {{ message }} @@ -588,10 +590,10 @@ export default { }); } else { console.log('识别失败!' + resData.data.msg) - this.$refs.toast.show('识别失败!', 'bottom') + this.show('识别失败!', 'bottom') } } else { - this.$refs.toast.show('识别失败!', 'bottom') + this.show('识别失败!', 'bottom') } }, fail: (err) => { @@ -686,10 +688,10 @@ export default { icon: 'success' }); } else { - this.$refs.toast.show('识别失败!', 'bottom') + this.show('识别失败!', 'bottom') } } else { - this.$refs.toast.show('识别失败!', 'bottom') + this.show('识别失败!', 'bottom') } }, fail: (err) => { @@ -701,7 +703,7 @@ export default { }); } catch (error) { console.error('相册图片处理或OCR识别失败:', error); - this.$refs.toast.show('识别失败!', 'bottom') + this.show('识别失败!', 'bottom') } finally { this.isProcessing = false; } diff --git a/src/services/wsMaInfo/wsMaInfo.js b/src/services/wsMaInfo/wsMaInfo.js index 40d4c17..b26ad5d 100644 --- a/src/services/wsMaInfo/wsMaInfo.js +++ b/src/services/wsMaInfo/wsMaInfo.js @@ -64,11 +64,11 @@ export const getMaModeData = (parentId) => { } -export const updateCheckTime = (maCode) => { +export const updateCheckTime = (data) => { return http({ method: 'POST', url: '/material/wsMaInfo/updateCheckTime', - data: {maCode} + data: data }) }