@@ -86,3 +86,12 @@ export function delZjdzdInfo(query) { | |||
params: query | |||
}) | |||
} | |||
// 提交照片-宅基地宗地 | |||
export function submitUploadImageList(data) { | |||
return request({ | |||
url: '/houseSurvey/zjdzd/submitUploadImageList', | |||
method: 'post', | |||
data: data | |||
}) | |||
} |
@@ -295,7 +295,7 @@ | |||
</van-field> | |||
<van-field name="uploader" label="宅基地现场照片" autocomplete="off"> | |||
<template #input> | |||
<van-uploader v-model="fileListzjd" :after-read="beforeReadzjd" multiple @delete="deleteFilezjd" :max-count="20"></van-uploader> | |||
<van-uploader v-model="fileListzjd" :after-read="beforeReadzjd" @delete="deleteFilezjd" :max-count="20"></van-uploader> | |||
</template> | |||
</van-field> | |||
<van-field | |||
@@ -602,7 +602,7 @@ | |||
@click-left="showsyqr=false" | |||
> | |||
<template #left> | |||
<van-icon name="arrow-left" size="18" color="#fff" /> | |||
<van-icon name="arrow-left" size="18" color="#fff" style="line-height: 32px;" /> | |||
</template> | |||
<template #title> | |||
<p style="color:#fff">使用权利人</p> | |||
@@ -2936,16 +2936,11 @@ | |||
showdcsh:false, | |||
zjdAudit:'1', | |||
auditRemark:"", | |||
ycms:"", | |||
isyc:'Y', | |||
ycms:"", | |||
showycbj:false, | |||
shownh:false, | |||
showhzzjlx:false, | |||
showhzoccupation:false, | |||
showhzjzqk:false, | |||
showhzjzhcssfyzf:false, | |||
showhzsjly:false, | |||
minDate:new Date(1950,1,1), | |||
maxDate:new Date(2030,1,1), | |||
nhdmValue:null, | |||
@@ -3092,8 +3087,6 @@ | |||
yctcyxOptions: [], | |||
// 被惩处经历字典 | |||
bccjlOptions: [], | |||
// 审批或建设前土地状况字典 | |||
tdzkOptions: [], | |||
// 批准时间字典 | |||
pzsjOptions: [], | |||
// 共有方式字典 | |||
@@ -3796,8 +3789,8 @@ | |||
img.onload = () => { | |||
const h = img.height | |||
const w = img.width | |||
let ch = img.height/6 | |||
let cw = img.width/6 | |||
let ch = img.height/1 | |||
let cw = img.width/1 | |||
let canvas = document.createElement('canvas') | |||
let ctx = canvas.getContext('2d') | |||
canvas.height = ch | |||
@@ -3812,14 +3805,17 @@ | |||
} | |||
const data2 = new FormData(); | |||
data2.append("file", new Blob([new Uint8Array(d)],{type:'image/jpeg'})); | |||
this.saveBlobAsFile(new Blob([new Uint8Array(d)],{type:'image/jpeg'}),this.form.zjddm) | |||
uploadFile(data2).then(res => { | |||
if(this.$cookies.get("upload")==null||this.$cookies.get("upload")==0){ | |||
uploadFile(data2).then(res => { | |||
if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""){ | |||
this.form.zjdxctp = this.form.zjdxctp + "," + res.fileName | |||
}else{ | |||
this.form.zjdxctp = res.fileName | |||
} | |||
}) | |||
}else{ | |||
this.saveBlobAsFile(new Blob([new Uint8Array(d)],{type:'image/jpeg'}),this.form.zjddm) | |||
} | |||
} | |||
}, | |||
blobToBase64(blob) { | |||
@@ -3836,16 +3832,15 @@ | |||
}); | |||
}, | |||
saveBlobAsFile(blob, fileName) { | |||
/* var reader = new FileReader(blob); | |||
var reader = new FileReader(blob); | |||
reader.onloadend = function () { | |||
var base64 = reader.result ; | |||
var link = document.createElement("a"); | |||
link.setAttribute("href", base64); | |||
link.setAttribute("download", fileName); | |||
link.click(); | |||
/!**!/ | |||
}; | |||
reader.readAsDataURL(blob);*/ | |||
reader.readAsDataURL(blob); | |||
let link = document.createElement("a"); | |||
link.href = window.URL.createObjectURL(blob); | |||
@@ -3979,12 +3974,6 @@ | |||
this.form5.sjly = value.dictValue | |||
this.showhncysjly= false | |||
}, | |||
// 户主数据来源弹出框 | |||
onConfirmhzsjly(value){ | |||
this.nhform.sjlyName = value.dictLabel | |||
this.nhform.sjly = value.dictValue | |||
this.showhzsjly= false | |||
}, | |||
// 宅基地等级弹出框 | |||
onConfirmdj(value){ | |||
this.form.djName = value.dictLabel | |||
@@ -4528,10 +4517,29 @@ | |||
} | |||
this.fileListzjd = [] | |||
if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""&&this.form.zjdxctp.length>0){ | |||
let li = this.form.zjdxctp.split(","); | |||
li.map(res => { | |||
this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) | |||
}) | |||
if(this.baseUrl==""){ | |||
let tt = setInterval( function () | |||
{ | |||
if(this.baseUrl!=""){ | |||
clearInterval(tt) | |||
if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""){ | |||
let li = this.form.zjdxctp.split(","); | |||
li.map(res => { | |||
this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) | |||
console.log({"url":this.baseUrl+res,"baseUrl":res}) | |||
}) | |||
} | |||
} | |||
},1000); | |||
}else{ | |||
if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""){ | |||
let li = this.form.zjdxctp.split(","); | |||
li.map(res => { | |||
this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) | |||
console.log({"url":this.baseUrl+res,"baseUrl":res}) | |||
}) | |||
} | |||
} | |||
} | |||
this.lyzkOptions.map(res => { | |||
@@ -5581,6 +5589,7 @@ | |||
let li = this.nmfwform.zjdxctp.split(","); | |||
li.map(res => { | |||
this.fileListfw.push({"url":this.baseUrl+res,"baseUrl":res}) | |||
}) | |||
} | |||
if(this.nmfwform.sfkjgj==null||this.nmfwform.sfkjgj==""){ | |||
@@ -6120,7 +6129,7 @@ | |||
border-radius: 3px; | |||
position:absolute; | |||
left:0; | |||
bottom:0; | |||
bottom:10px; | |||
} | |||
>>> .delete-button { | |||
height: 100%; | |||
@@ -66,7 +66,7 @@ | |||
<div v-if="active==1" style="height:calc( 100vh - 350px);overflow-y:auto;"> | |||
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask" :immediate-check="false"> | |||
<van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" :to="{name:'homesteadList'}"style="border-radius: 16px; | |||
<van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px"> | |||
<template #title> | |||
<div>{{item.deptName}} | |||
@@ -100,7 +100,7 @@ | |||
</div> | |||
<div v-if="active==2" style="height:calc( 100vh - 350px);overflow-y:auto;"> | |||
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask"> | |||
<van-cell v-for="(item,index) in doneList" :key="item.id" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px; | |||
<van-cell v-for="(item,index) in doneList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px"> | |||
<template #title> | |||
<p style="float:right">{{item.deptName}} | |||
@@ -132,7 +132,7 @@ | |||
</div> | |||
<div v-if="active==3" style="height:calc( 100vh - 350px);overflow-y:auto;"> | |||
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask"> | |||
<van-cell v-for="(item,index) in todoList" :key="item.id" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px; | |||
<van-cell v-for="(item,index) in todoList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px"> | |||
<template #title> | |||
<div>{{item.deptName}} | |||
@@ -173,6 +173,7 @@ | |||
import {getInfo} from "../../api/login"; | |||
import CircleProccess from "@/components/circleProccess.vue"; | |||
import {updateUserPwd} from "../../api/onlineHome/my"; | |||
import {Dialog} from "vant"; | |||
export default { | |||
name: "homesteadIndex", | |||
components: { | |||
@@ -232,6 +233,7 @@ | |||
}); | |||
}, | |||
mounted(){ | |||
// 监听屏幕方向 | |||
let self = this; | |||
window.addEventListener( | |||
@@ -332,7 +334,23 @@ | |||
} | |||
}, | |||
setCookies(item){ | |||
this.$cookies.set("item",JSON.stringify(item)); | |||
if(this.$cookies.get("upload")==null||this.$cookies.get("upload")==0){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '当前未选择批量上传,可能会由于网络原因上传图片缓慢,是否继续?', | |||
}) | |||
.then(() => { | |||
// on confirm | |||
this.$router.push({name:'homesteadList'}) | |||
this.$cookies.set("item",JSON.stringify(item)); | |||
}) | |||
.catch(() => { | |||
// on cancel | |||
}); | |||
}else{ | |||
this.$router.push({name:'homesteadList'}) | |||
this.$cookies.set("item",JSON.stringify(item)); | |||
} | |||
}, | |||
getList() { | |||
this.totalList = [] | |||
@@ -5,14 +5,30 @@ | |||
<van-nav-bar | |||
style="background:transparent;border-bottom-width:0;" | |||
@click-left="onClickLeft" | |||
@click-right="showUploadList" | |||
> | |||
<template #left> | |||
<van-icon name="arrow-left" size=".5rem" color="#fff" /> | |||
</template> | |||
<template #right> | |||
<van-icon v-if="$cookies.get('upload')!=null&&$cookies.get('upload')==1" name="photo-o" size=".5rem" color="#fff"/> | |||
</template> | |||
<template #title> | |||
<p style="color:#fff">{{item.deptName}}</p> | |||
</template> | |||
</van-nav-bar> | |||
<van-popup v-model:show="showImageList" position="bottom" style="height:40vh;padding:50px 10px 0" closeable | |||
close-icon="close"> | |||
<p style="color:#000;position:absolute;top:0.426667rem;left:0.426667rem">图片上传</p> | |||
<div style="width:100%;height:calc( 40vh - 100px);overflow-y: scroll;"> | |||
<van-uploader v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" style/> | |||
</div> | |||
<van-row justify="space-around" style=" position:fixed;bottom:0;left:0;width:100%;height:50px;text-align: center;"> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="uploadImgList = [],uploadImgList1 = []">清空</van-button></van-col> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList">上传</van-button></van-col> | |||
</van-row> | |||
</van-popup> | |||
<div style="display:flex;width:94%;margin:0 auto;justify-content:space-between;padding: 10px 0"> | |||
<div style="display:flex;width:90%;margin:0 auto;"> | |||
<div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="activeBtn=1,getDc()" | |||
@@ -1203,7 +1219,7 @@ | |||
</template> | |||
<script> | |||
import {listZjdzd,getQueryLand,getZjdzd,delZjdzdInfo} from "@/api/homesteadSurvey/zjdzd"; | |||
import {listZjdzd,getQueryLand,getZjdzd,delZjdzdInfo,uploadFile,submitUploadImageList} from "@/api/homesteadSurvey/zjdzd"; | |||
import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh"; | |||
import {addNhhncy, delNhhncy, exportNhhncy, getNhhncy, listNhhncy, updateNhhncy} from "@/api/homesteadSurvey/nhhncy"; | |||
import {listShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr"; | |||
@@ -1352,7 +1368,6 @@ | |||
drawingClick:true, | |||
//搜索---start | |||
seachText: "", | |||
selectionIconShow: false, | |||
//搜索栏目-操作栏显隐 | |||
searchBarOperVisbile: false, | |||
mapDataAll: [], | |||
@@ -1386,6 +1401,10 @@ | |||
// 任务完成标记 | |||
isFinished:false, | |||
// | |||
showImageList:false, | |||
uploadImgList:[], | |||
uploadImgList1:[], | |||
}; | |||
}, | |||
mounted(){ | |||
@@ -1473,6 +1492,116 @@ | |||
} | |||
}, | |||
methods: { | |||
showUploadList(){ | |||
this.showImageList = true; | |||
}, | |||
submitUploadList(){ | |||
submitUploadImageList(this.uploadImgList1).then(res => { | |||
let _this = this | |||
this.$toast({ | |||
icon: 'success', // 找到自己需要的图标 | |||
message: '上传成功', | |||
duration:"1000", | |||
onClose:function(){ | |||
_this.showImageList = false | |||
} | |||
}) | |||
}) | |||
}, | |||
// 图片上传前 | |||
beforeReadImageList(file){ | |||
let _this = this | |||
if(file.length!=undefined){ | |||
file.map(res => { | |||
let zjddm = res.file.name | |||
//zjddm=zjddm.substring(0,zjddm.lastIndexOf("\(")); | |||
// 创建Canvas对象(画布) | |||
let canvas = document.createElement('canvas') | |||
// 获取对应的CanvasRenderingContext2D对象(画笔) | |||
let context = canvas.getContext('2d') | |||
// 创建新的图片对象 | |||
let img = new Image() | |||
// 指定图片的DataURL(图片的base64编码数据) | |||
img.src = res.content | |||
// 监听浏览器加载图片完成,然后进行进行绘制 | |||
img.onload = () => { | |||
/*const h = img.height | |||
const w = img.width*/ | |||
let ch = img.height/6 | |||
let cw = img.width/6 | |||
let canvas = document.createElement('canvas') | |||
let ctx = canvas.getContext('2d') | |||
canvas.height = ch | |||
canvas.width = cw | |||
ctx.clearRect(0,0,cw,ch) | |||
ctx.drawImage(img,0,0,cw,ch) | |||
let base_img = canvas.toDataURL('image/jpeg') | |||
let blobBin = atob(base_img.split(',')[1]) | |||
let d = [] | |||
for (let i=0;i<blobBin.length;i++){ | |||
d.push(blobBin.charCodeAt(i)) | |||
} | |||
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) | |||
}) | |||
} | |||
}) | |||
}else{ | |||
let zjddm = file.file.name | |||
//zjddm=zjddm.substring(0,zjddm.lastIndexOf("\(")); | |||
// 创建Canvas对象(画布) | |||
let canvas = document.createElement('canvas') | |||
// 获取对应的CanvasRenderingContext2D对象(画笔) | |||
let context = canvas.getContext('2d') | |||
// 创建新的图片对象 | |||
let img = new Image() | |||
// 指定图片的DataURL(图片的base64编码数据) | |||
img.src = file.content | |||
// 监听浏览器加载图片完成,然后进行进行绘制 | |||
img.onload = () => { | |||
/*const h = img.height | |||
const w = img.width*/ | |||
let ch = img.height/6 | |||
let cw = img.width/6 | |||
let canvas = document.createElement('canvas') | |||
let ctx = canvas.getContext('2d') | |||
canvas.height = ch | |||
canvas.width = cw | |||
ctx.clearRect(0,0,cw,ch) | |||
ctx.drawImage(img,0,0,cw,ch) | |||
let base_img = canvas.toDataURL('image/jpeg') | |||
let blobBin = atob(base_img.split(',')[1]) | |||
let d = [] | |||
for (let i=0;i<blobBin.length;i++){ | |||
d.push(blobBin.charCodeAt(i)) | |||
} | |||
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) | |||
}) | |||
} | |||
} | |||
}, | |||
deleteFileImageList(file){ | |||
let url = file.file.name | |||
this.uploadImgList1.map((res,index) => { | |||
if(res.zjddm==url){ | |||
this.uploadImgList1.remove(index); | |||
} | |||
}) | |||
}, | |||
validatorIdcardqlr(val){ | |||
if(this.qlrform.dbrzjlx=='01'){ | |||
if(this.vcheckID(val)){ | |||
@@ -5307,25 +5436,22 @@ | |||
zjdHc(){ | |||
if(this.zjdHcDy != "" && this.zjdHcDy != "undefined"){ | |||
if(this.mapZjdData !=undefined && this.mapZjdData !="" && this.mapZjdDataTure !=""){ | |||
console.log("ggggggggg") | |||
this.mapZjdTeAll.active =1; | |||
// console.log(this.mapZjdTeAll); | |||
// this.$cookies.set("search",cookMap); | |||
// console.log(this.$cookies.get("search")); | |||
this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}}); | |||
this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$router.push({path:'/homesteadSurvey/add'}); | |||
}else if(this.mapZrzData !=undefined && this.mapZrzData !=""){ | |||
if(this.mapZjdTeAll.mapZjdAData !=""){ | |||
this.mapZjdTeAll.active = 3; | |||
// this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$router.push({path:'/homesteadSurvey/add',query: {res: this.mapZjdTeAll}}); | |||
this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$router.push({path:'/homesteadSurvey/add'}); | |||
} else { | |||
this.$toast("必须有宅基地数据才能进入自然幢核查"); | |||
} | |||
}else { | |||
if(this.mapZjdTeAll.mapZjdAData !="") { | |||
this.mapZjdTeAll.active = 4; | |||
//this.$cookies.set("search", this.mapZjdTeAll); | |||
this.$router.push({path: '/homesteadSurvey/add',query: {res: this.mapZjdTeAll}}); | |||
this.$cookies.set("search", this.mapZjdTeAll); | |||
this.$router.push({path: '/homesteadSurvey/add'}); | |||
} else { | |||
this.$toast("必须有宅基地数据才能进入附属设施核查"); | |||
} | |||
@@ -24,6 +24,11 @@ | |||
<van-icon :name="require('../../assets/images/housesteadSurvey/little2.png')" size="18" color="#fff" style="margin:10px;"/> | |||
</template> | |||
</van-cell> | |||
<van-cell title="上传设置" @click="showUpload = true " style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;background:#fff;padding:20px;"> | |||
<template #icon> | |||
<van-icon :name="require('../../assets/images/housesteadSurvey/little2.png')" size="18" color="#fff" style="margin:10px;"/> | |||
</template> | |||
</van-cell> | |||
<van-cell title="退出软件" is-link to="/homesteadLogin" style="border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px;background:#fff;padding:20px;"> | |||
<template #icon> | |||
<van-icon :name="require('../../assets/images/housesteadSurvey/little2.png')" size="18" color="#fff" style="margin:10px;"/> | |||
@@ -39,6 +44,13 @@ | |||
</van-row> | |||
</van-cell-group> | |||
</van-popup> | |||
<van-popup v-model:show="showUpload" position="bottom" style="width:100%;padding:20px;"> | |||
<van-cell center title="批量上传"> | |||
<template #right-icon> | |||
<van-switch v-model="checked" size="24" @change="changeUpload"/> | |||
</template> | |||
</van-cell> | |||
</van-popup> | |||
</div> | |||
</template> | |||
@@ -53,9 +65,18 @@ | |||
oldPassword: "", | |||
newPassword: "", | |||
confirmPassword: "", | |||
checked:$cookies.get("upload")!=null?true:false, | |||
showUpload:false, | |||
}}, | |||
methods:{ | |||
changeUpload(){ | |||
if(this.checked){ | |||
this.$cookies.set("upload",1) | |||
}else{ | |||
this.$cookies.set("upload",0) | |||
} | |||
}, | |||
submit() { | |||
if(this.confirmPassword | |||
!=this.newPassword){ | |||
@@ -85,7 +106,6 @@ | |||
} | |||
); | |||
} | |||
} | |||
} | |||