diff --git a/src/api/contracted/index.js b/src/api/contracted/index.js new file mode 100644 index 00000000..4effbf60 --- /dev/null +++ b/src/api/contracted/index.js @@ -0,0 +1,19 @@ +import request from '@/utils/request'; + +// 获取确权调查任务列表 +export function listSurveyTask(params) { + return request({ + url: '/service/landsurvey/mobile/list', + method: 'get', + params: params + }); +} + +// 获取承包方列表 +export function listCbf(params) { + return request({ + url: '/service/cbf/list', + method: 'get', + params: params + }); +} diff --git a/src/api/sunVillage_info/homestead/application.js b/src/api/sunVillage_info/homestead/application.js index 398cfe85..bc38282e 100644 --- a/src/api/sunVillage_info/homestead/application.js +++ b/src/api/sunVillage_info/homestead/application.js @@ -104,7 +104,15 @@ export function attach(data){ data:data }) } - +//批量上传图片 +export function attachs(data){ + return request({ + url:'/common/attachs', + method:'post', + header: { "Content-Type": 'application/x-www-form-urlencoded' }, + data:data + }) +} //删除列表项 export function removeList(id){ return request({ diff --git a/src/components/house/MultiImageUploadComp.vue b/src/components/house/MultiImageUploadComp.vue index b5b2e121..efa0921c 100644 --- a/src/components/house/MultiImageUploadComp.vue +++ b/src/components/house/MultiImageUploadComp.vue @@ -80,7 +80,6 @@ export default { } file.fileList = this.uploadImg.fileList; this.$emit('fileChanged', this.uploadImg.fileList); - this.$emit('fileUpdate', file); this.updateValue(); console.log('新增', this.uploadImg.fileList); }).catch((e) => { @@ -185,7 +184,7 @@ export default { this.internalValue = arr; else this.internalValue = arr.join(','); - console.log('更新值: ', this.internalValue); + this.$emit('fileUpdate', this.internalValue); this.$emit('input', this.internalValue); }, } diff --git a/src/views/contracted/index.vue b/src/views/contracted/index.vue index ae041de7..3d530d3b 100644 --- a/src/views/contracted/index.vue +++ b/src/views/contracted/index.vue @@ -4,8 +4,8 @@
-

欢迎,张三

-

13306311234

+

欢迎,{{ nickName }}

+

{{ phone }}

-
+

已完成任务

-

84

+

{{ surveyTask['FINISHED'].length }}

-
+

进行中任务

-

84

+

{{ surveyTask['UNFINISHED'].length }}

-

任务清单(112)

+

任务清单({{surveyTask[taskOption].length}})

已完成 总数 @@ -40,23 +40,18 @@

- - -
+ + +
-

A镇 B村

-

200

+

{{item.parentName}} {{item.deptName}}

+

{{item.cbfFinishNum}}

-

张三、李四、王五

-

800

+

{{item.surUsernames}}

+

{{item.cbfNum}}

@@ -89,35 +84,56 @@ diff --git a/src/views/contracted/village/contractor/contractor.vue b/src/views/contracted/village/contractor/contractor.vue index f812d339..2add8bd7 100644 --- a/src/views/contracted/village/contractor/contractor.vue +++ b/src/views/contracted/village/contractor/contractor.vue @@ -1,13 +1,13 @@ diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index 907cf191..ff160ab5 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -223,24 +223,29 @@ userList().then(response => { this.taskExecutortions = response.data }) - console.info(this.checked); if(this.checked){ - let userId = this.$store.getters.userId; setTimeout(() => { + let userId = this.$store.state.user.userId; + console.info(userId); this.nickName = this.$store.state.user.nickName; + this.$set(this.queryParams, "rwzxr", userId); + this.getList(); },1000) - this.$set(this.queryParams, "rwzxr", userId); - this.getList(); + }else{ this.$set(this.queryParams, "rwzxr", null); this.getList(); } getTownInfo(100).then(response => { this.xzList = response.data + let qbxz = {deptId:100,deptName:"全部乡镇"} + this.xzList.unshift(qbxz); }) + axios.get('../static/dictyType.json').then(res => { this.dictTypeList = res.data }) + }, mounted(){ @@ -371,7 +376,7 @@ }, checkChange(e){ if(e){ - let userId = this.$store.getters.userId; + let userId = this.$store.state.user.userId; this.$set(this.queryParams, "rwzxr", userId); this.getList(); }else{ @@ -398,7 +403,7 @@ this.$router.push({name:'homesteadList'}) this.$cookies.set("item",JSON.stringify(item)); }*/ - let userId = this.$store.getters.userId; + let userId = this.$store.state.user.userId; let businessLevel = this.$store.getters.businessLevel; if(businessLevel === "2" || item.rwzxrIds.includes(userId)){ localStorage.setItem("surveyItem",JSON.stringify(item)); @@ -420,9 +425,14 @@ xzChange(val){ this.deptName = val.deptName; this.showDropList = false; - this.$set(this.queryParams, "parentId", val.deptId); + if(val.deptId != 100){ + this.$set(this.queryParams, "parentId", val.deptId); + this.$set(this.switchParams, "parentId", val.deptId); + }else{ + this.$set(this.queryParams, "parentId", null); + this.$set(this.switchParams, "parentId", null); + } this.getList(); - this.$set(this.switchParams, "parentId", val.deptId); this.queryNum(); }, checkBadge(){ @@ -431,7 +441,7 @@ }, queryNum(){ if(this.checked){ - let userId = this.$store.getters.userId; + let userId = this.$store.state.user.userId; this.$set(this.switchParams, "rwzxr", userId); listTask(this.switchParams).then(response => { this.done = 0; diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 7d2379b7..3463933d 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -5,14 +5,10 @@ - @@ -22,11 +18,11 @@

图片上传

- +
- 清空 - 上传 + 清空 + 上传
@@ -95,6 +91,7 @@

调查

+

附件

删除

@@ -120,12 +117,13 @@ import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy"; import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr"; import {listSuyqr,updateSuyqr,addSuyqr} from "@/api/homesteadSurvey/suyqr"; - import {listZrz,getZrzZjdDmList,getZrz} from "@/api/homesteadSurvey/zrz"; - import {listFsss,getFsssZjdDmList,getFsss} from "@/api/homesteadSurvey/fsss"; + import {getZrz} from "@/api/homesteadSurvey/zrz"; + import {getFsss} from "@/api/homesteadSurvey/fsss"; import {getGeoServerConfigKey} from "@/api/system/config"; - import { listTown, getTown } from "@/api/homesteadSurvey/town"; - import { listVillage} from "@/api/homesteadSurvey/village"; import {deptGetId,} from "@/api/homestead/index"; + import {attachmentFind} from "@/api/sunVillage_info/homestead/application"; + import {base64Attach} from "@/api/user"; + import {systemAttachment} from "@/api/onlineHome/bankAgriculture/paymentApproval"; import $ from "jquery"; import {Dialog} from "vant"; import {ref} from "vue"; @@ -313,6 +311,7 @@ isFinished:false, // showImageList:false, + zjdId:null, uploadImgList:[], uploadImgList1:[], // 字典列表json @@ -434,12 +433,28 @@ this.totalR = res.data.shyqrs; }); }, - showUploadList(){ + showUploadList(id){ + this.getAttachments(id); this.showImageList = true; + this.zjdId = id; }, - submitUploadList(){ - submitUploadImageList(this.uploadImgList1).then(res => { - let _this = this + submitUploadList(val){ + let f = [] + for (let i of this.uploadImgList){ + if(i.content !== undefined){ + f.push(i.content) + } + } + console.info(this.uploadImgList); + let _this = this; + let file = { + tableId:val, + tableName:"t_homestead_zjdzdxx", + bizPath:"upload", + fileType:"0", + files: f + }; + base64Attach(file).then((resp) => { this.$toast({ icon: 'success', // 找到自己需要的图标 message: '上传成功', @@ -448,11 +463,11 @@ _this.showImageList = false } }) - }) + }); }, // 图片上传前 beforeReadImageList(file){ - let _this = this + let _this = this; if(file.length!=undefined){ file.map(res => { let zjddm = res.file.name @@ -485,13 +500,7 @@ } let data2 = new FormData(); data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'})); - uploadFile(data2).then(response => { - let p={ - "zjddm":zjddm, - "url":response.fileName - } - _this.uploadImgList1.push(p) - }) + uploadFile(data2); } }) }else{ @@ -525,24 +534,15 @@ } let data2 = new FormData(); data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'})); - uploadFile(data2).then(response => { - let p={ - "zjddm":zjddm, - "url":response.fileName - } - _this.uploadImgList1.push(p) - }) + uploadFile(data2); } } }, deleteFileImageList(file){ - let url = file.file.name - this.uploadImgList1.map((res,index) => { - if(res.zjddm==url){ - this.uploadImgList1.remove(index); - } - }) + if(file.id !== undefined ){ + systemAttachment(file.id); + } }, validatorIdcardqlr(val){ if(this.qlrform.dbrzjlx=='01'){ @@ -1549,6 +1549,19 @@ } }) }, + getAttachments(id) { + this.uploadImgList = []; + let cond = { + tableId: id, + tableName: 't_homestead_zjdzdxx', + fileType: 0, + }; + attachmentFind(cond).then(resp => { + this.uploadImgList = resp.data.map(function(item){ + return {id:item.id,url:'/api'+item.fileUrl,isImage: true} + }); + }); + }, getZjdList(){ this.countyhc = 0; if(this.active === 0){ @@ -5041,7 +5054,15 @@ // } //数据库循环加载时使用 --------------------加载较慢 ------start }, - + qkClick(){ + this.uploadImgList1 = this.uploadImgList; + for(let i = 0; i < this.uploadImgList1.length; i++){ + if(this.uploadImgList[i].id !== undefined ){ + systemAttachment(this.uploadImgList[i].id); + } + } + this.uploadImgList = []; + }, /*右侧列表 --展开收缩*/ selectionPushMap() { this.selectionIconShow = true; diff --git a/src/views/homesteadSurvey/list2.vue b/src/views/homesteadSurvey/list2.vue index 723272aa..d841f650 100644 --- a/src/views/homesteadSurvey/list2.vue +++ b/src/views/homesteadSurvey/list2.vue @@ -28,7 +28,7 @@
-
入户
+
入户核查
农户信息
所有权人
切换地图
diff --git a/src/views/homesteadSurvey/list4.vue b/src/views/homesteadSurvey/list4.vue index b49d3eef..027c03b7 100644 --- a/src/views/homesteadSurvey/list4.vue +++ b/src/views/homesteadSurvey/list4.vue @@ -583,6 +583,7 @@ 审批通过 +