liuminjian 3 年前
父节点
当前提交
3367442627
共有 2 个文件被更改,包括 24 次插入16 次删除
  1. +9
    -9
      src/api/authenticRight/index.js
  2. +15
    -7
      src/views/authenticRight/index.vue

+ 9
- 9
src/api/authenticRight/index.js 查看文件

@@ -4,7 +4,7 @@ import request from '@/utils/request'
//查询列表 //查询列表
export function listSampling(data){ export function listSampling(data){
return request({ return request({
url:'transaction/website/listSampling',
url:'service/sampling/list',
method:'get', method:'get',
params:data params:data
}) })
@@ -12,13 +12,13 @@ export function listSampling(data){
// 删除农户抽样 // 删除农户抽样
export function delSampling(id) { export function delSampling(id) {
return request({ return request({
url: '/transaction/website/delSampling/' + id,
url: '/service/sampling/remove/' + id,
method: 'get' method: 'get'
}) })
} }
export function updateSampling(data) { export function updateSampling(data) {
return request({ return request({
url: '/transaction/website/updateSampling',
url: '/service/sampling/edit',
method: 'post', method: 'post',
data: data data: data
}) })
@@ -26,14 +26,14 @@ export function updateSampling(data) {
// 查询农户抽样详细 // 查询农户抽样详细
export function getInvestigate(id) { export function getInvestigate(id) {
return request({ return request({
url: '/transaction/website/getInvestigate/' + id,
url: '/service/sampling/getInvestigate/' + id,
method: 'get' method: 'get'
}) })
} }
// 新增农户抽样 // 新增农户抽样
export function addSampling(data) { export function addSampling(data) {
return request({ return request({
url: '/transaction/website/addSampling',
url: '/service/sampling/add',
method: 'post', method: 'post',
data: data data: data
}) })
@@ -41,7 +41,7 @@ export function addSampling(data) {
// 新增农户抽样 // 新增农户抽样
export function addInvestigate(data) { export function addInvestigate(data) {
return request({ return request({
url: '/transaction/website/addInvestigate',
url: '/service/sampling/addInvestigate',
method: 'post', method: 'post',
data: data data: data
}) })
@@ -49,7 +49,7 @@ export function addInvestigate(data) {
// 修改农户抽样 // 修改农户抽样
export function updateInvestigate(data) { export function updateInvestigate(data) {
return request({ return request({
url: '/transaction/website/editInvestigate',
url: '/service/sampling/editInvestigate',
method: 'post', method: 'post',
data: data data: data
}) })
@@ -57,7 +57,7 @@ export function updateInvestigate(data) {
//查询列表 //查询列表
export function listSamplingDept(data){ export function listSamplingDept(data){
return request({ return request({
url:'transaction/website/listSamplingDept',
url:'service/sampling/listSamplingDept',
method:'get', method:'get',
params:data params:data
}) })
@@ -65,7 +65,7 @@ export function listSamplingDept(data){
// 修改农户抽样 // 修改农户抽样
export function uploadFile(data) { export function uploadFile(data) {
return request({ return request({
url: '/transaction/website/ocr/idcard',
url: '/service/sampling/ocr/idcard',
method: 'post', method: 'post',
data: data data: data
}) })


+ 15
- 7
src/views/authenticRight/index.vue 查看文件

@@ -113,7 +113,7 @@
:rules="[{ required: true, message: '请填写被核查人姓名' }]" :rules="[{ required: true, message: '请填写被核查人姓名' }]"
> >
<template #button> <template #button>
<van-uploader :after-read="afterRead" v-model="fileList" :preview-image="false" :max-count="1">
<van-uploader :after-read="afterRead" v-model="fileList" :max-size="4 * 1024 * 1024" @oversize="onOversize" :preview-image="false" :max-count="1" capture="camera" accept="image/*">
<van-button icon="photograph" type="primary" size="mini">扫描身份证</van-button> <van-button icon="photograph" type="primary" size="mini">扫描身份证</van-button>
</van-uploader> </van-uploader>
</template> </template>
@@ -638,6 +638,15 @@


}, },
methods:{ methods:{
onOversize(){
this.$toast({
icon: 'error', // 找到自己需要的图标
message: '文件大小超过4MB,上传失败',
duration:"1000",
onClose:function(){
}
})
},
afterRead(file) { afterRead(file) {
const data = new FormData(); const data = new FormData();
data.append("file", this.fileList[0].file); data.append("file", this.fileList[0].file);
@@ -645,9 +654,10 @@
if(res.code == 200){ if(res.code == 200){
this.xcdcform.idcardCheckedBy = res.idcardCheckedBy this.xcdcform.idcardCheckedBy = res.idcardCheckedBy
this.xcdcform.nameCheckedBy = res.nameCheckedBy this.xcdcform.nameCheckedBy = res.nameCheckedBy
this.fileList=[]
this.xcdcform["fileUrl"] = res.url
} }
}) })
this.fileList = []
}, },
changeFn(val) { changeFn(val) {
}, },
@@ -1017,7 +1027,6 @@
}) })
}else { }else {
addInvestigate(this.xcdcform).then(res => { addInvestigate(this.xcdcform).then(res => {

this.showXCDC = false this.showXCDC = false
let _this = this let _this = this
this.xcdcform.status = "2" this.xcdcform.status = "2"
@@ -1079,11 +1088,10 @@
} }
}, },
getList(){ getList(){
console.log("111")
this.queryParams["farmerName"] = null this.queryParams["farmerName"] = null
listSampling(this.queryParams).then(response => { 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){ if(item.status==0){
item.status="未调查" item.status="未调查"
}else if(item.status==1){ }else if(item.status==1){
@@ -1094,7 +1102,7 @@
item.status="电话调查" item.status="电话调查"
} }
}) })
this.samplingList = response.data;
this.samplingList = response.rows;
this.loading = false; this.loading = false;
} }
}); });


正在加载...
取消
保存