From b1a42ed8fb173ca2dda1c819f72a7035cfa8c47a Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 1 Nov 2022 09:26:13 +0800 Subject: [PATCH] up --- .../zhilin-cascader/zhilin-cascader.vue | 2 +- inspect/info.vue | 104 +++-- inspect/inspect.vue | 124 +++--- inspect/list.vue | 9 +- pages.json | 5 + solve/index.vue | 175 ++++++++- solve/solve.vue | 368 ++++++++++++++++++ 7 files changed, 673 insertions(+), 114 deletions(-) create mode 100644 solve/solve.vue diff --git a/components/zhilin-cascader/zhilin-cascader.vue b/components/zhilin-cascader/zhilin-cascader.vue index c7971af..15f7207 100644 --- a/components/zhilin-cascader/zhilin-cascader.vue +++ b/components/zhilin-cascader/zhilin-cascader.vue @@ -189,7 +189,7 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - padding: 20rpx 28rpx; + padding: 6rpx 28rpx; box-sizing: border-box; position: relative; diff --git a/inspect/info.vue b/inspect/info.vue index 88d6c3a..695a803 100644 --- a/inspect/info.vue +++ b/inspect/info.vue @@ -70,11 +70,27 @@ 照片: - - + + - + + + + 视频: + + + + + + + + 音频: + + + + + +
@@ -100,14 +116,30 @@ {{item.deal_content}} - - - - 处理照片: - - - - + + + + 处理照片: + + + + + + + + 处理视频: + + + + + + + + 处理音频: + + + +
@@ -139,7 +171,13 @@ data() { return { item: {}, - dealFilesList: [] + dealFilesList: [], + askImgs:[], + askVideos:[], + askAudios:[], + dealImgs:[], + dealVideos:[], + dealAudios:[] } }, onReady() { @@ -161,22 +199,40 @@ id: id }, utilSuccess: function(res) { - that.item = res + that.item = res + // console.log(that.fileListObj) + // for(var m in that.fileListObj){ + // console.log("m",m,res[m]) + // for(var k of res[m]){ + // console.log("k",k) + // that.fileListObj[m]['arr'].push(k.uploads[0].url) + // } + // } + // console.log(that.fileListObj) + for(var m of res.ask_images){ + that.askImgs.push(m.uploads[0].url) + } + for(var m of res.ask_videos){ + that.askVideos.push(m.uploads[0].url) + } + for(var m of res.ask_voice){ + that.askAudios.push(m.uploads[0].url) + } + for(var m of res.deal_images){ + that.dealImgs.push(m.uploads[0].url) + } + for(var m of res.deal_videos){ + that.dealVideos.push(m.uploads[0].url) + } + for(var m of res.deal_voice){ + that.dealAudios.push(m.uploads[0].url) + } }, utilFail: function(res) { that.util.alert(res); } }); - }, - imgListPreview(item) { - var urlList = [] - urlList.push(item) //push中的参数为 :src="item.img_url" 中的图片地址 - uni.previewImage({ - indicator: "number", - loop: true, - urls: urlList - }) - }, + } } } diff --git a/inspect/inspect.vue b/inspect/inspect.vue index a1a63c2..2dbd92d 100644 --- a/inspect/inspect.vue +++ b/inspect/inspect.vue @@ -71,7 +71,7 @@ :action="action"> - + 提交 @@ -257,43 +257,56 @@ }, // 文件上传 - onprogress(res) { - // uni.showToast({ - // icon: "none", - // title: "上传中", - // duration: 2000 - // }) - uni.showLoading({ - title: '上传中' - }); - }, - tosuccess() { - // uni.showToast({ - // icon: "none", - // title: "上传成功", - // duration: 2000 - // }) + uploadSuccess(res,type){ + console.log(type) uni.showLoading({ - title: '上传成功' - }); - }, - toremove(index, lists, name, whatfile) { - if (whatfile == "picFileList") { - this.picFileList.splice(index, 1) + title:"上传成功" + }) + let obj = {} + let data = JSON.parse(res.data) + obj.id = data.id + obj.url = data.url + if(type=="pic"){ + obj.type=0 + }else{ + obj.type=1 } - if (whatfile == "dealFilesList") { - this.dealFilesList.splice(index, 1) + + 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; } }, - toupload(lists, name, whatfile) { - var that = this; - if (whatfile == "picFileList") { - that.picFileList = lists - } - if (whatfile == "dealFilesList") { - that.dealFilesList = lists; + 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) + }, submit(){ var that = this; let pic = [] @@ -314,7 +327,7 @@ for(var m in fileListObj){ for(var k of fileListObj[m]['arr']){ pic.push({ - id:k.id, + upload_id:k.id, type:fileListObj[m]['type'] }) } @@ -351,50 +364,7 @@ url: "../inspect/list" }) }, - 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,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/inspect/list.vue b/inspect/list.vue index 36af6cb..2a950af 100644 --- a/inspect/list.vue +++ b/inspect/list.vue @@ -1,7 +1,7 @@