From eba35bece658dbccdec9f80d31af74656326e36a Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 2 Aug 2021 11:57:26 +0800 Subject: [PATCH 1/2] =?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 | 1122 ++++++++++++++-------------- 1 file changed, 550 insertions(+), 572 deletions(-) diff --git a/src/views/authenticRight/index.vue b/src/views/authenticRight/index.vue index 5d6ec46f..b444b37a 100644 --- a/src/views/authenticRight/index.vue +++ b/src/views/authenticRight/index.vue @@ -47,9 +47,9 @@ {{item.status}} - 替补 - 电话 - 现场 + 替补 + 电话 + 现场 @@ -103,7 +103,6 @@ label="原抽查户主姓名" label-width="120px" placeholder="原抽查户主姓名" - :rules="[{ required: true, message: '请填写原抽查户主姓名' }]" /> - - + +

农村土地承包经营权证

- - + + - - + + - - + + { - if(res.data){ - this.option1=[{ text: '请选择区县', value: 0 }] - res.data.map(item => { - this.option1.push({ "text":item.countName,"value": item.countName}) - }) + ], + userId :null, + nickName:null, + currentValue:null, } - }) - getInfo().then(response => { - console.log(response) - this.userId = response.user.userId - this.nickName = response.user.nickName - }); - }, - methods:{ - changeFn(val) { - }, - confirmFn(){ - this.xcdcform.fileTime = getNowFormatDate(this.currentValue) - this.dhdcform.fileTime = getNowFormatDate(this.currentValue) - this.showDate = false; - this.showDate1 = false; - }, - cancelFn(){ - this.showDate = false; - this.showDate1 = false; - } - , - showPop(){ - this.showDate = true; }, - showPop1(){ - this.showDate1 = true; - }, - changeDept(val){ - if(val==1){ - this.queryParams.countName = this.value1 - this.queryParams.townName = null - this.queryParams.villageName = null - this.queryParams.cooperativeName = null - listSamplingDept(this.queryParams).then(res => { - if(res.data){ - this.option11=[{ text: '请选择乡镇', value: 0 }] - res.data.map(item => { - this.option11.push({ "text":item.townName,"value": item.townName}) - }) - this.value11=0 - this.value2=0 - this.value22=0 - } - }) - }else if(val==2){ - this.queryParams.countName = this.value1 - this.queryParams.townName = this.value11 - this.queryParams.villageName = null - this.queryParams.cooperativeName = null - listSamplingDept(this.queryParams).then(res => { - if(res.data){ - this.option2=[{ text: '请选择村级', value: 0 }] - res.data.map(item => { - this.option2.push({ "text":item.villageName,"value": item.villageName}) - }) - this.value2=0 - this.value22=0 - } - }) - }else if(val==3){ - this.queryParams.countName = this.value1 - this.queryParams.townName = this.value11 - this.queryParams.villageName = this.value2 - this.queryParams.cooperativeName = null - listSamplingDept(this.queryParams).then(res => { - if(res.data){ - this.option22=[{ text: '请选择合作社', value: 0 }] - res.data.map(item => { - this.option22.push({ "text":item.cooperativeName,"value": item.cooperativeName}) - }) - this.value22=0 - } - }) - - }else if(val==4){ - this.queryParams.countName = this.value1 - this.queryParams.townName = this.value11 - this.queryParams.villageName = this.value2 - this.queryParams.cooperativeName = this.value22 - this.getList() - } + created(){ + listSamplingDept(this.queryParams).then(res => { + if(res.data){ + this.option1=[{ text: '请选择区县', value: 0 }] + res.data.map(item => { + this.option1.push({ "text":item.countName,"value": item.countName}) + }) + } + }) + getInfo().then(response => { + this.userId = response.user.userId + this.nickName = response.user.nickName + }); }, - reset(){ - this.queryform={ - pageNum: 1, - pageSize: 10, - // 查询排序 - //orderByColumn: "id", - //isAsc: "desc", - countName: null, - townName: null, - villageName: null, - cooperativeName: null, - farmerName: null, - status: null, - id: null, + methods:{ + changeFn(val) { + }, + confirmFn(){ + this.xcdcform.fileTime = getNowFormatDate(this.currentValue) + this.dhdcform.fileTime = getNowFormatDate(this.currentValue) + this.showDate = false; + this.showDate1 = false; + }, + cancelFn(){ + this.showDate = false; + this.showDate1 = false; } - this.xcdcform={ + , + showPop(){ + this.showDate = true; + }, + showPop1(){ + this.showDate1 = true; + }, + changeDept(val){ + if(val==1){ + this.queryParams.countName = this.value1 + this.queryParams.townName = null + this.queryParams.villageName = null + this.queryParams.cooperativeName = null + listSamplingDept(this.queryParams).then(res => { + if(res.data){ + this.option11=[{ text: '请选择乡镇', value: 0 }] + res.data.map(item => { + this.option11.push({ "text":item.townName,"value": item.townName}) + }) + this.value11=0 + this.value2=0 + this.value22=0 + } + }) + }else if(val==2){ + this.queryParams.countName = this.value1 + this.queryParams.townName = this.value11 + this.queryParams.villageName = null + this.queryParams.cooperativeName = null + listSamplingDept(this.queryParams).then(res => { + if(res.data){ + this.option2=[{ text: '请选择村级', value: 0 }] + res.data.map(item => { + this.option2.push({ "text":item.villageName,"value": item.villageName}) + }) + this.value2=0 + this.value22=0 + } + }) + }else if(val==3){ + this.queryParams.countName = this.value1 + this.queryParams.townName = this.value11 + this.queryParams.villageName = this.value2 + this.queryParams.cooperativeName = null + listSamplingDept(this.queryParams).then(res => { + if(res.data){ + this.option22=[{ text: '请选择合作社', value: 0 }] + res.data.map(item => { + this.option22.push({ "text":item.cooperativeName,"value": item.cooperativeName}) + }) + this.value22=0 + } + }) + + }else if(val==4){ + this.queryParams.countName = this.value1 + this.queryParams.townName = this.value11 + this.queryParams.villageName = this.value2 + this.queryParams.cooperativeName = this.value22 + this.getList() + } + }, + reset(){ + this.queryform={ + pageNum: 1, + pageSize: 10, + // 查询排序 + //orderByColumn: "id", + //isAsc: "desc", + countName: null, + townName: null, + villageName: null, + cooperativeName: null, + status: null, + id: null, + } + this.xcdcform={ countName: null, townName: null, villageName: null, @@ -763,8 +759,8 @@ export default { samplingId: null, searchValue: null, updateBy: null, - }; - this.dhdcform={ + }; + this.dhdcform={ countName: null, townName: null, villageName: null, @@ -789,48 +785,35 @@ export default { samplingId: null, searchValue: null, updateBy: null, - } - }, - onClickRight() { - this.show = true - this.queryform = { - pageNum: 1, - pageSize: 10, - // 查询排序 - //orderByColumn: "id", - //isAsc: "desc", - countName: null, - townName: null, - villageName: null, - cooperativeName: null, - farmerName: null, - status: null, - id: null, - } - }, - onSearch() { - - }, - onChange({ value }) { - this.options.map(i => { - if (value === i.value) { - getDeptList(value).then(response => { - if(response.data.length>0){ - i.children=[] - response.data.map(item => { - i.children.push({ text: item.deptName,value:item.deptId}); - }); - } - }); } - }) - }, - removeRow(id,index){ - let _this = this - Dialog.confirm({ - title: '删除', - message: '删除后数据无法恢复,确认要删除么?' - }).then(() => { + }, + onClickRight() { + this.show = true + this.queryform = this.queryParams + }, + onSearch() { + + }, + onChange({ value }) { + this.options.map(i => { + if (value === i.value) { + getDeptList(value).then(response => { + if(response.data.length>0){ + i.children=[] + response.data.map(item => { + i.children.push({ text: item.deptName,value:item.deptId}); + }); + } + }); + } + }) + }, + removeRow(id,index){ + let _this = this + Dialog.confirm({ + title: '删除', + message: '删除后数据无法恢复,确认要删除么?' + }).then(() => { delSampling(id).then(res => { this.$toast({ icon: 'success', // 找到自己需要的图标 @@ -840,180 +823,62 @@ export default { _this.getList(); } }) - }) - }).catch(() => { - // on cancel - }); - - }, - onFinish({ selectedOptions }) { - this.show1 = false; - this.fieldValue = selectedOptions.map((option) => option.text).join('/'); - }, - /** 判断是否有证书 */ - haveCertificate(id){ - if(id == "1"){ - if(this.xcdcform.item1=='N'){ - this.xcdcform.item2 = 'N' - this.xcdcform.item3 = 'N' - this.xcdcform.item4 = 'N' - this.xcdcform.item5 = 'N' - this.xcdcform.item8 = 'N' - this.xcdcform.item9 = 'N' - }else { - this.xcdcform.item2 = null - this.xcdcform.item3 = null - this.xcdcform.item4 = null - this.xcdcform.item5 = null - this.xcdcform.item8 = null - this.xcdcform.item9 = null - } - }if(id == "2") { - if(this.xcdcform.item10=='N'){ - this.xcdcform.item11 = 'N' - this.xcdcform.item12 = 'N' - this.xcdcform.item13 = 'N' - this.xcdcform.item14 = 'N' - this.xcdcform.item15 = 'N' - this.xcdcform.item16 = 'N' - this.xcdcform.item17 = 'N' - this.xcdcform.item18 = 'N' - }else { - this.xcdcform.item11 = null - this.xcdcform.item12 = null - this.xcdcform.item13 = null - this.xcdcform.item14 = null - this.xcdcform.item15 = null - this.xcdcform.item16 = null - this.xcdcform.item17 = null - this.xcdcform.item18 = null - } - } - }, - selectType(val,data){ - let form = data - if(val==1){ - form.status="1" - let _this = this - updateSampling(form).then(res => { - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '修改成功', - duration:"1000", - onClose:function(){ - _this.getList(); - } }) - }) - }else if(val==3){ - this.reset(); - this.showXCDC=true - getInvestigate(data.id).then(res => { - console.log(data) - if(res.data){ - this.xcdcform = res.data - this.xcdcform["countName"] = data.countName - this.xcdcform["townName"] = data.townName - this.xcdcform["villageName"] = data.villageName - this.xcdcform["cooperativeName"] = data.cooperativeName - this.xcdcform["farmerName"] = data.farmerName - }else{ - this.xcdcform["countName"] = data.countName - this.xcdcform["townName"] = data.townName - this.xcdcform["villageName"] = data.villageName - this.xcdcform["cooperativeName"] = data.cooperativeName - this.xcdcform["farmerName"] = data.farmerName - this.xcdcform["samplingId"] = data.id - this.xcdcform["fileName"] = data.townName+data.villageName - this.xcdcform["checkedBy"] = this.nickName - this.xcdcform["fileTime"] = getNowFormatDate() - } - }) + }).catch(() => { + // on cancel + }); - }else if(val==2){ - console.log(data) - this.reset(); - console.log(this.dhdcform) - this.showDHDC=true - getInvestigate(data.id).then(res => { - if(res.data){ - this.dhdcform = res.data - this.dhdcform["countName"] = data.countName - this.dhdcform["townName"] = data.townName - this.dhdcform["villageName"] = data.villageName - this.dhdcform["cooperativeName"] = data.cooperativeName - this.dhdcform["farmerName"] = data.farmerName - }else{ - this.dhdcform["countName"] = data.countName - this.dhdcform["townName"] = data.townName - this.dhdcform["villageName"] = data.villageName - this.dhdcform["cooperativeName"] = data.cooperativeName - this.dhdcform["farmerName"] = data.farmerName - this.dhdcform["samplingId"] = data.id - this.dhdcform["fileName"] = data.townName+data.villageName - this.dhdcform["checkedBy"] = this.nickName - this.dhdcform["fileTime"] = getNowFormatDate() + }, + onFinish({ selectedOptions }) { + this.show1 = false; + this.fieldValue = selectedOptions.map((option) => option.text).join('/'); + }, + /** 判断是否有证书 */ + haveCertificate(id){ + if(id == "1"){ + if(this.xcdcform.item1=='N'){ + this.xcdcform.item2 = 'N' + this.xcdcform.item3 = 'N' + this.xcdcform.item4 = 'N' + this.xcdcform.item5 = 'N' + this.xcdcform.item8 = 'N' + this.xcdcform.item9 = 'N' + }else { + this.xcdcform.item2 = null + this.xcdcform.item3 = null + this.xcdcform.item4 = null + this.xcdcform.item5 = null + this.xcdcform.item8 = null + this.xcdcform.item9 = null } - }) - } - }, - onSubmit(values) { - this.queryform["createBy"] = this.userId - this.queryform["createTime"] = getNowFormatDate() - addSampling(this.queryform).then(res => { - console.log(res) - this.show = false - this.getList(); - }) - }, - onSubmitXCDC(values) { - this.xcdcform["createBy"] = this.userId - this.xcdcform["createTime"] = getNowFormatDate() - this.xcdcform["updateBy"] = this.userId - this.xcdcform["updateTime"] = getNowFormatDate() - let i = 0 - if(this.xcdcform.item1=='N'){ - i++ - }if(this.xcdcform.item2=='N'){ - i++ - }if(this.xcdcform.item3=='N'){ - i++ - }if(this.xcdcform.item4=='N'){ - i++ - }if(this.xcdcform.item5=='N'){ - i++ - }if(this.xcdcform.item8=='N'){ - i++ - }if(this.xcdcform.item9=='N'){ - i++ - }if(this.xcdcform.item10=='N'){ - i++ - }if(this.xcdcform.item11=='N'){ - i++ - }if(this.xcdcform.item12=='N'){ - i++ - }if(this.xcdcform.item13=='N'){ - i++ - }if(this.xcdcform.item14=='N'){ - i++ - }if(this.xcdcform.item15=='N'){ - i++ - }if(this.xcdcform.item16=='N'){ - i++ - }if(this.xcdcform.item17=='N'){ - i++ - }if(this.xcdcform.item18=='N'){ - i++ - } - this.xcdcform["lackCount"] = i - if(this.xcdcform.id){ - updateInvestigate(this.xcdcform).then(res => { - this.showXCDC = false + }if(id == "2") { + if(this.xcdcform.item10=='N'){ + this.xcdcform.item11 = 'N' + this.xcdcform.item12 = 'N' + this.xcdcform.item13 = 'N' + this.xcdcform.item14 = 'N' + this.xcdcform.item15 = 'N' + this.xcdcform.item16 = 'N' + this.xcdcform.item17 = 'N' + this.xcdcform.item18 = 'N' + }else { + this.xcdcform.item11 = null + this.xcdcform.item12 = null + this.xcdcform.item13 = null + this.xcdcform.item14 = null + this.xcdcform.item15 = null + this.xcdcform.item16 = null + this.xcdcform.item17 = null + this.xcdcform.item18 = null + } + } + }, + selectType(val,data1,index){ + if(val==1){ let _this = this - this.xcdcform.status = "2" - this.xcdcform.id = this.xcdcform.samplingId - updateSampling(this.xcdcform).then(res => { - _this.reset() + let a = data1 + a.status = "1" + updateSampling(a).then(res => { this.$toast({ icon: 'success', // 找到自己需要的图标 message: '修改成功', @@ -1023,107 +888,220 @@ export default { } }) }) + }else if(val==3){ + this.reset(); + this.showXCDC=true + getInvestigate(data.id).then(res => { + if(res.data){ + this.xcdcform = res.data + this.xcdcform["countName"] = data.countName + this.xcdcform["townName"] = data.townName + this.xcdcform["villageName"] = data.villageName + this.xcdcform["cooperativeName"] = data.cooperativeName + this.xcdcform["farmerName"] = data.farmerName + }else{ + this.xcdcform["countName"] = data.countName + this.xcdcform["townName"] = data.townName + this.xcdcform["villageName"] = data.villageName + this.xcdcform["cooperativeName"] = data.cooperativeName + this.xcdcform["farmerName"] = data.farmerName + this.xcdcform["samplingId"] = data.id + this.xcdcform["fileName"] = data.townName+data.villageName + this.xcdcform["checkedBy"] = this.nickName + this.xcdcform["fileTime"] = getNowFormatDate() + } + }) + + }else if(val==2){ + this.reset(); + this.showDHDC=true + getInvestigate(data.id).then(res => { + if(res.data){ + this.dhdcform = res.data + this.dhdcform["countName"] = data.countName + this.dhdcform["townName"] = data.townName + this.dhdcform["villageName"] = data.villageName + this.dhdcform["cooperativeName"] = data.cooperativeName + this.dhdcform["farmerName"] = data.farmerName + }else{ + this.dhdcform["countName"] = data.countName + this.dhdcform["townName"] = data.townName + this.dhdcform["villageName"] = data.villageName + this.dhdcform["cooperativeName"] = data.cooperativeName + this.dhdcform["farmerName"] = data.farmerName + this.dhdcform["samplingId"] = data.id + this.dhdcform["fileName"] = data.townName+data.villageName + this.dhdcform["checkedBy"] = this.nickName + this.dhdcform["fileTime"] = getNowFormatDate() + } + }) + } + }, + onSubmit(values) { + this.queryform["createBy"] = this.userId + this.queryform["createTime"] = getNowFormatDate() + addSampling(this.queryform).then(res => { + this.show = false + this.getList(); }) - }else { - addInvestigate(this.xcdcform).then(res => { - console.log(res) - this.showXCDC = false - let _this = this - this.xcdcform.status = "2" - this.xcdcform.id = this.xcdcform.samplingId - updateSampling(this.xcdcform).then(res => { - _this.reset() - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '保存成功', - duration:"1000", - onClose:function(){ - _this.getList(); - } + }, + onSubmitXCDC(values) { + this.xcdcform["createBy"] = this.userId + this.xcdcform["createTime"] = getNowFormatDate() + this.xcdcform["updateBy"] = this.userId + this.xcdcform["updateTime"] = getNowFormatDate() + let i = 0 + if(this.xcdcform.item1=='N'){ + i++ + }if(this.xcdcform.item2=='N'){ + i++ + }if(this.xcdcform.item3=='N'){ + i++ + }if(this.xcdcform.item4=='N'){ + i++ + }if(this.xcdcform.item5=='N'){ + i++ + }if(this.xcdcform.item8=='N'){ + i++ + }if(this.xcdcform.item9=='N'){ + i++ + }if(this.xcdcform.item10=='N'){ + i++ + }if(this.xcdcform.item11=='N'){ + i++ + }if(this.xcdcform.item12=='N'){ + i++ + }if(this.xcdcform.item13=='N'){ + i++ + }if(this.xcdcform.item14=='N'){ + i++ + }if(this.xcdcform.item15=='N'){ + i++ + }if(this.xcdcform.item16=='N'){ + i++ + }if(this.xcdcform.item17=='N'){ + i++ + }if(this.xcdcform.item18=='N'){ + i++ + } + this.xcdcform["lackCount"] = i + if(this.xcdcform.id){ + updateInvestigate(this.xcdcform).then(res => { + this.showXCDC = false + let _this = this + this.xcdcform.status = "2" + this.xcdcform.id = this.xcdcform.samplingId + updateSampling(this.xcdcform).then(res => { + _this.reset() + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '修改成功', + duration:"1000", + onClose:function(){ + _this.getList(); + } + }) }) }) - }) - }}, - onSubmitDHDC(values) { - this.dhdcform["createBy"] = this.userId - this.dhdcform["createTime"] = getNowFormatDate() - this.dhdcform["updateBy"] = this.userId - this.dhdcform["updateTime"] = getNowFormatDate() - console.log(this.dhdcform) - if(this.dhdcform.id){ - updateInvestigate(this.dhdcform).then(res => { - console.log(res) - this.showDHDC = false - let _this = this - this.dhdcform.status = "3" - this.dhdcform.id = this.dhdcform.samplingId - updateSampling(this.dhdcform).then(res => { - _this.reset() - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '修改成功', - duration:"1000", - onClose:function(){ - _this.getList(); - } + }else { + addInvestigate(this.xcdcform).then(res => { + + this.showXCDC = false + let _this = this + this.xcdcform.status = "2" + this.xcdcform.id = this.xcdcform.samplingId + updateSampling(this.xcdcform).then(res => { + _this.reset() + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '保存成功', + duration:"1000", + onClose:function(){ + _this.getList(); + } + }) }) }) - }) - }else { - addInvestigate(this.dhdcform).then(res => { - console.log(res) - this.showDHDC = false - let _this = this - this.dhdcform.status = "3" - this.dhdcform.id = this.dhdcform.samplingId - updateSampling(this.dhdcform).then(res => { - _this.reset() - this.$toast({ - icon: 'success', // 找到自己需要的图标 - message: '保存成功', - duration:"1000", - onClose:function(){ - _this.getList(); - } + }}, + onSubmitDHDC(values) { + this.dhdcform["createBy"] = this.userId + this.dhdcform["createTime"] = getNowFormatDate() + this.dhdcform["updateBy"] = this.userId + this.dhdcform["updateTime"] = getNowFormatDate() + if(this.dhdcform.id){ + updateInvestigate(this.dhdcform).then(res => { + this.showDHDC = false + let _this = this + this.dhdcform.status = "3" + this.dhdcform.id = this.dhdcform.samplingId + updateSampling(this.dhdcform).then(res => { + _this.reset() + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '修改成功', + duration:"1000", + onClose:function(){ + _this.getList(); + } + }) }) }) - }) - } - }, - getList(){ - listSampling(this.queryParams).then(response => { - if(response.data.length>0){ - response.data.map(item => { - if(item.status==0){ - item.status="未调查" - }else if(item.status==1){ - item.status="被替补" - }else if(item.status==2){ - item.status="现场调查" - }else if(item.status==3){ - item.status="电话调查" - } + }else { + addInvestigate(this.dhdcform).then(res => { + this.showDHDC = false + let _this = this + this.dhdcform.status = "3" + this.dhdcform.id = this.dhdcform.samplingId + updateSampling(this.dhdcform).then(res => { + _this.reset() + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '保存成功', + duration:"1000", + onClose:function(){ + _this.getList(); + } + }) + }) }) - this.samplingList = response.data; - this.loading = false; } - }); - }, - onL() { - this.refreshing = true; - this.loading = false; - this.refreshing = false; - }, - onRefresh() { - // 清空列表数据 - this.finished = false; - // 重新加载数据 - // 将 loading 设置为 true,表示处于加载状态 - this.loading = true; - this.onL(); + }, + getList(){ + this.queryParams["farmerName"] = null + console.log(12121) + listSampling(this.queryParams).then(response => { + if(response.data.length>0){ + response.data.map(item => { + if(item.status==0){ + item.status="未调查" + }else if(item.status==1){ + item.status="被替补" + }else if(item.status==2){ + item.status="现场调查" + }else if(item.status==3){ + item.status="电话调查" + } + }) + this.samplingList = response.data; + this.loading = false; + } + }); + }, + onL() { + this.refreshing = true; + this.loading = false; + this.refreshing = false; + }, + onRefresh() { + // 清空列表数据 + this.finished = false; + // 重新加载数据 + // 将 loading 设置为 true,表示处于加载状态 + this.loading = true; + this.onL(); + }, }, - }, -} + }