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..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); @@ -645,9 +654,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) { }, @@ -1017,7 +1027,6 @@ }) }else { addInvestigate(this.xcdcform).then(res => { - this.showXCDC = false let _this = this this.xcdcform.status = "2" @@ -1079,11 +1088,10 @@ } }, getList(){ - 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 +1102,7 @@ item.status="电话调查" } }) - this.samplingList = response.data; + this.samplingList = response.rows; this.loading = false; } });