diff --git a/components/htz-image-upload/htz-image-upload.vue b/components/htz-image-upload/htz-image-upload.vue index 2046827..be147d7 100644 --- a/components/htz-image-upload/htz-image-upload.vue +++ b/components/htz-image-upload/htz-image-upload.vue @@ -746,11 +746,17 @@ } .htz-image-upload-Item { - width: 160rpx; - height: 160rpx; + width: 200rpx; + height: 200rpx; + line-height: 170rpx; margin: 13rpx; border-radius: 10rpx; - position: relative; + position: relative; + overflow: hidden; + margin: 5px; + background: #f4f5f6; + position: relative; + border-radius: 5px; } .htz-image-upload-Item image { @@ -790,7 +796,7 @@ font-size: 105rpx; /* line-height: 160rpx; */ text-align: center; - border: 1px dashed #d9d9d9; + /* border: 1px dashed #d9d9d9; */ color: #d9d9d9; } diff --git a/inspect/info.vue b/inspect/info.vue index 6fa1d76..88d6c3a 100644 --- a/inspect/info.vue +++ b/inspect/info.vue @@ -112,7 +112,7 @@
- + - - - - - +
diff --git a/inspect/inspect.vue b/inspect/inspect.vue index ef6b0db..a1a63c2 100644 --- a/inspect/inspect.vue +++ b/inspect/inspect.vue @@ -35,32 +35,40 @@ - - + --> + - - + - - + @@ -99,7 +107,7 @@ token: "" }, picFileList: [], - videoFileList:[], + videoFileList:[], // 存储播放url audioFileList:[], form: { area_id: "", @@ -250,18 +258,24 @@ // 文件上传 onprogress(res) { - uni.showToast({ - icon: "none", - title: "上传中", - duration: 2000 - }) + // uni.showToast({ + // icon: "none", + // title: "上传中", + // duration: 2000 + // }) + uni.showLoading({ + title: '上传中' + }); }, tosuccess() { - uni.showToast({ - icon: "none", - title: "上传成功", - duration: 2000 - }) + // uni.showToast({ + // icon: "none", + // title: "上传成功", + // duration: 2000 + // }) + uni.showLoading({ + title: '上传成功' + }); }, toremove(index, lists, name, whatfile) { if (whatfile == "picFileList") { @@ -283,16 +297,25 @@ submit(){ var that = this; let pic = [] - for(var m of this.picFileList){ - if(m.response){ - pic.push({ - upload_id:m.response.id, - type:1 - }) - }else{ + let fileListObj = { + pics:{ + arr:this.picFileList, + type:1 + }, + videos:{ + arr:this.videoFileList, + type:2 + }, + audios:{ + arr:this.audioFileList, + type:3 + } + } + for(var m in fileListObj){ + for(var k of fileListObj[m]['arr']){ pic.push({ - upload_id:m.id, - type:1 + id:k.id, + type:fileListObj[m]['type'] }) } } @@ -328,13 +351,46 @@ url: "../inspect/list" }) }, - - uploadSuccess(res){ - console.log("uploadSuccess",res) - this.videoFileList.push(res.data.url) + uploadSuccess(res,type){ + console.log(type) + uni.showLoading({ + title:"上传成功" + }) + let obj = {} + let data = JSON.parse(res.data) + obj.id = data.id + obj.url = data.url + switch (type){ + case 'video': + this.videoFileList.push(obj) + break; + case 'audio': + this.audioFileList.push(obj) + break; + case 'pic': + this.picFileList.push(obj) + break; + default: + break; + } }, - imgDelete(res){ + imgDelete(res,type){ console.log("imgDelete",res) + let list = [] + list = res.tempFilePaths + switch (type){ + case 'video': + this.videoFileList = list + break; + case 'audio': + this.audioFileList= list + break; + case 'pic': + this.picFileList= list + break; + default: + break; + } }, uploadFail(res){ console.log("uploadFail",res) diff --git a/pages/index/index.vue b/pages/index/index.vue index bc7e27f..db1dda9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -26,13 +26,15 @@ :custom-style="getStyle"> 当前时间:{{nowTime}} - + 请确认时间和地点,再打卡 {{getStatus?'上班打卡':'下班打卡'}} - - 上班打卡时间:{{getTime}} - 下班打卡时间:{{downTime}} + + + 上班打卡时间:{{getTime}} + 下班打卡时间:{{downTime}} + @@ -206,7 +208,7 @@ lng_out:this.longitude, address_out:this.address }, - utilSuccess: function(result) { + utilSuccess: function(res) { that.$refs.uToast.show({ title: res.msg, callback:function(){ @@ -280,9 +282,15 @@ .getwrap { padding: 60rpx; - padding-bottom: 0rpx; + padding-bottom: 0rpx; + height:480rpx + } + .isget{ + height:280rpx + } + .gettime{ + padding-top:90rpx } - .getwrap view { margin-bottom: 20rpx; }