From 0a6e180643a5cc8b16fc79062e193997d97c32be Mon Sep 17 00:00:00 2001 From: Vinjor Date: Wed, 22 Jan 2025 14:30:50 +0800 Subject: [PATCH] 1 --- config.js | 8 ++++---- pages-home/home/home.vue | 7 +++++++ pages-order/addOrder/addOrder.vue | 7 +++++++ pages-order/addOrder/editOrder.vue | 14 ++++++++++++++ pages-order/choosePeople/choosePeople.vue | 7 +++++++ pages-order/orderDetail/orderDetail.vue | 7 +++++++ pages-repair/apply/applyForm.vue | 7 +++++++ pages-repair/applyList/todoDetail.vue | 7 +++++++ pages-repair/sign/sign.vue | 6 ++++++ pages-warehouse/inOutWarehouse/inOutWarehouse.vue | 7 +++++++ .../components/uni-file-picker/uni-file-picker.vue | 2 +- 11 files changed, 74 insertions(+), 5 deletions(-) diff --git a/config.js b/config.js index 13e4e5b..a972bb7 100644 --- a/config.js +++ b/config.js @@ -1,17 +1,17 @@ // 应用全局配置 module.exports = { //生产 - baseUrl: 'https://www.nuoyunr.com', + // baseUrl: 'https://www.nuoyunr.com', //开发 - // baseUrl: "http://192.168.1.17:48080", + baseUrl: "http://192.168.1.17:48080", // baseUrl: "http://rzqhb7.natappfree.cc", imagesUrl: 'http://shequ.0315e.com/static/images/pages/', baseImageUrl: 'https://www.nuoyunr.com/minio/', shareUrl: 'https://www.lighting-it.cn/share?inviteId=', //生产 - wsUrl: 'ws://122.51.230.86:48080', + // wsUrl: 'ws://122.51.230.86:48080', //本地 - // wsUrl: 'ws://192.168.1.17:48080', + wsUrl: 'ws://192.168.1.17.48080', //com.carService.qx // 应用信息 appInfo: { diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index 493008d..2bc646d 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -589,6 +589,10 @@ export default { }) }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -597,6 +601,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue index e50a5a0..a2f49b2 100644 --- a/pages-order/addOrder/addOrder.vue +++ b/pages-order/addOrder/addOrder.vue @@ -634,6 +634,10 @@ export default { } }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -642,6 +646,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-order/addOrder/editOrder.vue b/pages-order/addOrder/editOrder.vue index 9231d5a..56ff823 100644 --- a/pages-order/addOrder/editOrder.vue +++ b/pages-order/addOrder/editOrder.vue @@ -225,6 +225,8 @@ export default { busiFromIndex:0, partDisposals:[], partDisposalIndex:0, + //是否可以点击 + canClick:true, formData:{ userName: "", userMobile: "", @@ -287,6 +289,10 @@ export default { }, methods: { afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -295,6 +301,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } @@ -467,6 +476,10 @@ export default { this.$refs.popup.open("bottom") }, applyData(){ + if(!this.canClick){ + return + } + this.canClick = false let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",") let dataObj = this.formData dataObj.image=fileStr @@ -478,6 +491,7 @@ export default { method: 'POST', data: this.formData }).then(res => { + this.canClick =true this.$refs.popup.close() uni.showToast({ title: '修改成功', diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue index 8b27c13..a882ca8 100644 --- a/pages-order/choosePeople/choosePeople.vue +++ b/pages-order/choosePeople/choosePeople.vue @@ -164,6 +164,10 @@ export default { }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -172,6 +176,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue index f75f44e..f5e25dd 100644 --- a/pages-order/orderDetail/orderDetail.vue +++ b/pages-order/orderDetail/orderDetail.vue @@ -708,6 +708,10 @@ export default { } }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -716,6 +720,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-repair/apply/applyForm.vue b/pages-repair/apply/applyForm.vue index 5b1963d..ce1645c 100644 --- a/pages-repair/apply/applyForm.vue +++ b/pages-repair/apply/applyForm.vue @@ -202,6 +202,10 @@ this.$refs.popup.open("bottom") }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url: '/admin-api/infra/file/upload', @@ -210,6 +214,9 @@ this.fileList.push({ url: config.baseImageUrl + res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-repair/applyList/todoDetail.vue b/pages-repair/applyList/todoDetail.vue index 05c2036..4c6c70f 100644 --- a/pages-repair/applyList/todoDetail.vue +++ b/pages-repair/applyList/todoDetail.vue @@ -127,6 +127,10 @@ export default { afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url:'/admin-api/infra/file/upload', @@ -135,6 +139,9 @@ export default { this.fileList.push({ url: config.baseImageUrl+res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/pages-repair/sign/sign.vue b/pages-repair/sign/sign.vue index 9217be4..ff50f99 100644 --- a/pages-repair/sign/sign.vue +++ b/pages-repair/sign/sign.vue @@ -42,6 +42,7 @@ data() { return { data:{}, + canClick:true, showPickerColor: false, ctx: '', canvasWidth: 0, @@ -409,6 +410,10 @@ }); return } + if(!this.canClick){ + return + } + this.canClick=false console.log(this.data,'uploa') const newData = this.data uni.canvasToTempFilePath({ @@ -437,6 +442,7 @@ method: 'POST', data: newData }).then(res => { + this.canClick=true uni.showToast({ title: '创建工单成功', icon: 'success' diff --git a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue index 45830bf..e6af6b9 100644 --- a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue +++ b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue @@ -178,6 +178,10 @@ export default { }) }, afterRead(file) { + uni.showLoading({ + title: '正在上传中...', + mask:true + }); for (let i = 0; i < file.tempFilePaths.length; i++) { upload({ url: '/admin-api/infra/file/upload', @@ -186,6 +190,9 @@ export default { this.fileList.push({ url: config.baseImageUrl + res.data }) + if(i==file.tempFilePaths.length-1){ + uni.hideLoading() + } console.log(this.fileList) }) } diff --git a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue index 785c7eb..3558cb1 100644 --- a/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue +++ b/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue @@ -177,7 +177,7 @@ sizeType: { type: Array, default () { - return ['original', 'compressed'] + return ['compressed'] } }, sourceType: {