From b19b1be7d62c535067ce15db168401689ed18ddd Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 17:51:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/authenticRight/index.js | 18 +++++++++--------- src/views/authenticRight/index.vue | 9 +++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/api/authenticRight/index.js b/src/api/authenticRight/index.js index 8f5f64c9..08d831bd 100644 --- a/src/api/authenticRight/index.js +++ b/src/api/authenticRight/index.js @@ -4,7 +4,7 @@ import request from '@/utils/request' //查询列表 export function listSampling(data){ return request({ - url:'transaction/website/listSampling', + url:'service/sampling/list', method:'get', params:data }) @@ -12,13 +12,13 @@ export function listSampling(data){ // 删除农户抽样 export function delSampling(id) { return request({ - url: '/transaction/website/delSampling/' + id, + url: '/service/sampling/remove/' + id, method: 'get' }) } export function updateSampling(data) { return request({ - url: '/transaction/website/updateSampling', + url: '/service/sampling/edit', method: 'post', data: data }) @@ -26,14 +26,14 @@ export function updateSampling(data) { // 查询农户抽样详细 export function getInvestigate(id) { return request({ - url: '/transaction/website/getInvestigate/' + id, + url: '/service/sampling/getInvestigate/' + id, method: 'get' }) } // 新增农户抽样 export function addSampling(data) { return request({ - url: '/transaction/website/addSampling', + url: '/service/sampling/add', method: 'post', data: data }) @@ -41,7 +41,7 @@ export function addSampling(data) { // 新增农户抽样 export function addInvestigate(data) { return request({ - url: '/transaction/website/addInvestigate', + url: '/service/sampling/addInvestigate', method: 'post', data: data }) @@ -49,7 +49,7 @@ export function addInvestigate(data) { // 修改农户抽样 export function updateInvestigate(data) { return request({ - url: '/transaction/website/editInvestigate', + url: '/service/sampling/editInvestigate', method: 'post', data: data }) @@ -57,7 +57,7 @@ export function updateInvestigate(data) { //查询列表 export function listSamplingDept(data){ return request({ - url:'transaction/website/listSamplingDept', + url:'service/sampling/listSamplingDept', method:'get', params:data }) @@ -65,7 +65,7 @@ export function listSamplingDept(data){ // 修改农户抽样 export function uploadFile(data) { return request({ - url: '/transaction/website/ocr/idcard', + url: '/service/sampling/ocr/idcard', method: 'post', data: data }) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index c599738a..87add783 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -645,9 +645,10 @@ if(res.code == 200){ this.xcdcform.idcardCheckedBy = res.idcardCheckedBy this.xcdcform.nameCheckedBy = res.nameCheckedBy - this.fileList=[] + this.xcdcform["fileUrl"] = res.url } }) + this.fileList = [] }, changeFn(val) { }, @@ -1082,8 +1083,8 @@ console.log("111") this.queryParams["farmerName"] = null listSampling(this.queryParams).then(response => { - if(response.data.length>0){ - response.data.map(item => { + if(response.rows.length>0){ + response.rows.map(item => { if(item.status==0){ item.status="未调查" }else if(item.status==1){ @@ -1094,7 +1095,7 @@ item.status="电话调查" } }) - this.samplingList = response.data; + this.samplingList = response.rows; this.loading = false; } }); From b7ba4eea9afe7457d0e7d38e21a7ef51d3e00fdd Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 18:18:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/authenticRight/index.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index 87add783..5ea8a313 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -113,7 +113,7 @@ :rules="[{ required: true, message: '请填写被核查人姓名' }]" > @@ -1018,7 +1018,6 @@ }) }else { addInvestigate(this.xcdcform).then(res => { - this.showXCDC = false let _this = this this.xcdcform.status = "2" @@ -1080,7 +1079,6 @@ } }, getList(){ - console.log("111") this.queryParams["farmerName"] = null listSampling(this.queryParams).then(response => { if(response.rows.length>0){ From b64898428c7c1aa0f0fe361f6053667f4755d5e3 Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 18:52:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/authenticRight/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index 5ea8a313..c17f50ad 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -113,7 +113,7 @@ :rules="[{ required: true, message: '请填写被核查人姓名' }]" > From 84547acec20fc994df81e92797e38ac9c46130ad Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 18:57:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=A1=AE=E6=9D=83=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/authenticRight/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index c17f50ad..35344a0f 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -113,7 +113,7 @@ :rules="[{ required: true, message: '请填写被核查人姓名' }]" > @@ -638,6 +638,15 @@ }, methods:{ + onOversize(){ + this.$toast({ + icon: 'error', // 找到自己需要的图标 + message: '文件大小超过4MB,上传失败', + duration:"1000", + onClose:function(){ + } + }) + }, afterRead(file) { const data = new FormData(); data.append("file", this.fileList[0].file);