@@ -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({ | |||
@@ -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); | |||
}, | |||
} | |||
@@ -56,15 +56,14 @@ | |||
placeholder="行政区划名称" | |||
:rules="[{ required: true, message: '' }]" | |||
/>--> | |||
<field-select | |||
<van-field | |||
autocomplete="off" | |||
input-align="right" | |||
v-model="form.suyqrdm" | |||
name="所有权人代码" | |||
label="所有权人代码" | |||
value-key="suyqrdm" | |||
data-key="suyqrdm" | |||
placeholder="选择所有权人代码" | |||
:columns = "suyqrList" | |||
:on-remote-response="'data'" | |||
placeholder="所有权人代码" | |||
readonly | |||
/> | |||
<van-field | |||
autocomplete="off" | |||
@@ -324,14 +323,6 @@ | |||
placeholder="批准面积(㎡)" | |||
maxlength="15" | |||
/> | |||
<FieldRadio | |||
v-model="form.isMore" | |||
label="是否一户多宅" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
remote-url="/open/zdzh/list/house_yes_no" | |||
:on-remote-response="'data'" | |||
/> | |||
<FieldRadio | |||
v-model="form.sfcz" | |||
label="是否超占" | |||
@@ -467,6 +458,7 @@ | |||
/> | |||
<van-popup v-model:show="showXzqssj" position="bottom"> | |||
<van-datetime-picker | |||
:value="new Date" | |||
type="date" | |||
@confirm="onConfirmxzqssj" | |||
@cancel="showXzqssj = false" | |||
@@ -493,6 +485,12 @@ | |||
placeholder="年收益(元)" | |||
maxlength="15" | |||
/> | |||
<van-row type="flex" justify="space-between" align="center"> | |||
<van-col span="6"><div style="color: #646566;font-size: 0.373333rem;text-indent:17%;">宗地图</div></van-col> | |||
<van-col span="6"> | |||
<MultiImageUploadComp :value="form.zdt" :uploadDisabled="showUpload" @fileUpdate="fileUpdateZdt"/> | |||
</van-col> | |||
</van-row> | |||
<!-- <van-collapse v-model="activeZjd">--> | |||
<!-- <van-collapse-item title="利用状况" name="1" class="label-class">--> | |||
<!-- <van-field--> | |||
@@ -769,25 +767,18 @@ | |||
</template> | |||
<script> | |||
import {listShyqr,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr"; | |||
import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd"; | |||
import {getZjdzd,updateZjdzd,addZjdzd,getQueryLand} from "@/api/homesteadSurvey/zjdzd"; | |||
import {attach} from "@/api/sunVillage_info/homestead/application"; | |||
import FieldSelect from "@/components/form/FieldSelect"; | |||
import FieldRadio from "@/components/form/FieldRadio"; | |||
import CommonMap from "@/components/house/CommonMap"; | |||
import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz"; | |||
import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw"; | |||
import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr"; | |||
import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy"; | |||
import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh"; | |||
import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss"; | |||
import { listTown, getTown } from "@/api/homesteadSurvey/town"; | |||
import { listVillage} from "@/api/homesteadSurvey/village"; | |||
import { sysConfig} from "@/api/homesteadSurvey/index"; | |||
import {listSuyqr} from "@/api/homesteadSurvey/suyqr"; | |||
import MultiImageUploadComp from "@/components/house/MultiImageUploadComp" | |||
import { Notify, Dialog, Toast } from 'vant'; | |||
import axios from "axios"; | |||
export default { | |||
name: "homesteadAdd", | |||
components: { CommonMap,FieldSelect, FieldRadio}, | |||
components: { CommonMap,FieldSelect, FieldRadio,MultiImageUploadComp}, | |||
data() { | |||
return { | |||
active:1, | |||
@@ -806,6 +797,7 @@ export default { | |||
showWbzyy:false, | |||
showXzyy:false, | |||
showXzqssj:false, | |||
showUpload:false, | |||
minDate: new Date(1900,0,1), | |||
maxDate: new Date(2025, 10, 1), | |||
form:{} | |||
@@ -953,6 +945,16 @@ export default { | |||
this.$router.push({path:val}); | |||
} | |||
}, | |||
fileUpdateZdt(val){ | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_homestead_zjdzdxx"); | |||
params.append("bizPath", "upload"); | |||
params.append("fileType", "10"); | |||
params.append('file', val.file); | |||
console.info( val); | |||
this.$set(this.form, 'zdt',val); | |||
}, | |||
/**宅基地利用状态处理*/ | |||
onZjdlyzkChanged(val){ | |||
console.info(val); | |||
@@ -74,11 +74,15 @@ | |||
<p style="flex:1;text-align:right;">{{item.zcs}}</p> | |||
</div> | |||
<div style="text-align:center;overflow:auto;display: flex;justify-content: space-between;margin-top: 10px;"> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupzrz(item)"> | |||
<p style="width:33%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showUploadList(item.id)"> | |||
<van-icon name="photo-o" size=".4rem" color="#FFFFFF"/> | |||
<span style="font-size: 14px;color: #fff;margin-left: 5px;">自然幢附件</span> | |||
</p> | |||
<p style="width:33%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupzrz(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add01.png" alt=""> | |||
<span style="font-size: 14px;color: #fff;margin-left: 5px;">自然幢信息</span> | |||
</p> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="shownmfwlist(item)"> | |||
<p style="width:33%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="shownmfwlist(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add02.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">房屋列表</span> | |||
</p> | |||
@@ -94,22 +98,28 @@ | |||
<p style="font-size: 16px;" @click="showPopupAddzrz()">+ 添加自然幢信息</p> | |||
</div> | |||
</div> | |||
<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 accept="image/*" v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" /> | |||
</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="qkClick">清空</van-button></van-col> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList(zjdId)">上传</van-button></van-col> | |||
</van-row> | |||
</van-popup> | |||
</div> | |||
</template> | |||
<script> | |||
import {listShyqr,addShyqr,updateShyqr,delShyqr,setSyqrInfo} from "@/api/homesteadSurvey/shyqr"; | |||
import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd"; | |||
import MapGisDrawing from "@/components/Map/MapGisDrawing"; | |||
import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz"; | |||
import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw"; | |||
import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr"; | |||
import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy"; | |||
import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh"; | |||
import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss"; | |||
import { listTown, getTown } from "@/api/homesteadSurvey/town"; | |||
import { listVillage} from "@/api/homesteadSurvey/village"; | |||
import { sysConfig} from "@/api/homesteadSurvey/index"; | |||
import {uploadFile} from "@/api/homesteadSurvey/zjdzd"; | |||
import {listZrz,delZrz} from "@/api/homesteadSurvey/zrz"; | |||
import {attachmentFind} from "@/api/sunVillage_info/homestead/application"; | |||
import {systemAttachment} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {base64Attach} from "@/api/user"; | |||
import { Notify, Dialog, Toast } from 'vant'; | |||
import axios from "axios"; | |||
export default { | |||
@@ -121,6 +131,10 @@ export default { | |||
loading:false, | |||
finished:false, | |||
permission:false, | |||
showImageList:false, | |||
zjdId:null, | |||
uploadImgList:[], | |||
uploadImgList1:[], | |||
countyhc:1, | |||
zjdzdxx:{}, | |||
zrzlist:[] | |||
@@ -189,6 +203,135 @@ export default { | |||
}); | |||
} | |||
}, | |||
getAttachments(id) { | |||
console.info(id); | |||
this.uploadImgList = []; | |||
let cond = { | |||
tableId: id, | |||
tableName: 't_homespace_zrz', | |||
fileType: 0, | |||
}; | |||
attachmentFind(cond).then(resp => { | |||
this.uploadImgList = resp.data.map(function(item){ | |||
return {id:item.id,url:'/api'+item.fileUrl,isImage: true} | |||
}); | |||
}); | |||
}, | |||
deleteFileImageList(file){ | |||
if(file.id !== undefined ){ | |||
systemAttachment(file.id); | |||
} | |||
}, | |||
// 图片上传前 | |||
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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
}) | |||
}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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
} | |||
}, | |||
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 = []; | |||
}, | |||
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_homespace_zrz", | |||
bizPath:"upload", | |||
fileType:"0", | |||
files: f | |||
}; | |||
base64Attach(file).then((resp) => { | |||
this.$toast({ | |||
icon: 'success', // 找到自己需要的图标 | |||
message: '上传成功', | |||
duration:"1000", | |||
onClose:function(){ | |||
_this.showImageList = false | |||
} | |||
}) | |||
}); | |||
}, | |||
goRightBack(){ | |||
this.$router.push({path:'/homesteadSurvey/list'}); | |||
}, | |||
@@ -196,11 +339,16 @@ export default { | |||
this.$router.push({name:'zrzAdd',query:val}); | |||
}, | |||
showPopupAddzrz(){ | |||
this.$router.push({name:'zrzAdd',query:{zjddm:this.zjdzdxx.zjddm}}); | |||
this.$router.push({name:'zrzAdd',query:{zjddm:this.zjdzdxx.zjddm,fwjg:"02",sjly:"04"}}); | |||
}, | |||
shownmfwlist(val){ | |||
this.$router.push({name:'nmfwList',query:val}); | |||
}, | |||
showUploadList(id){ | |||
this.getAttachments(id); | |||
this.showImageList = true; | |||
this.zjdId = id; | |||
}, | |||
deletezrz(val){ | |||
const ids = val.id || this.ids; | |||
Dialog.confirm({ | |||
@@ -74,6 +74,10 @@ | |||
<p style="flex:1;text-align:right;">{{ formatDict(jzwqkList, item.jzwqk) }} </p> | |||
</div> | |||
<div style="text-align:center;overflow:auto;display: flex;justify-content: center;margin-top: 10px;"> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showUploadList(item.id)"> | |||
<van-icon name="photo-o" size=".4rem" color="#FFFFFF"/> | |||
<span style="font-size: 14px;color: #fff;margin-left: 5px;">附件</span> | |||
</p> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupzrz(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add01.png" alt=""> | |||
<span style="font-size: 14px;color: #fff;margin-left: 5px;" >查看附属设施信息</span> | |||
@@ -152,6 +156,18 @@ | |||
</van-dialog> | |||
<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 accept="image/*" v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" /> | |||
</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="qkClick">清空</van-button></van-col> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList(zjdId)">上传</van-button></van-col> | |||
</van-row> | |||
</van-popup> | |||
</div> | |||
</template> | |||
@@ -161,6 +177,10 @@ import {getZjdzd,updateZjdzd,zjddcSign} from "@/api/homesteadSurvey/zjdzd"; | |||
import MapGisDrawing from "@/components/Map/MapGisDrawing"; | |||
import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss"; | |||
import MultiImageUploadComp from "@/components/house/MultiImageUploadComp" | |||
import {uploadFile} from "@/api/homesteadSurvey/zjdzd"; | |||
import {attachmentFind} from "@/api/sunVillage_info/homestead/application"; | |||
import {systemAttachment} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {base64Attach} from "@/api/user"; | |||
import {Dialog} from "vant"; | |||
import $ from "jquery"; | |||
export default { | |||
@@ -177,6 +197,10 @@ export default { | |||
countyhc:1, | |||
ycbzShow:false, | |||
permission:false, | |||
showImageList:false, | |||
zjdId:null, | |||
uploadImgList:[], | |||
uploadImgList1:[], | |||
bztp:"", | |||
ycbz:"", | |||
jzwqkList:[], | |||
@@ -400,6 +424,138 @@ export default { | |||
dcsh(){ | |||
this.dcshShow = true; | |||
}, | |||
showUploadList(id){ | |||
this.getAttachments(id); | |||
this.showImageList = true; | |||
this.zjdId = id; | |||
}, | |||
getAttachments(id) { | |||
this.uploadImgList = []; | |||
let cond = { | |||
tableId: id, | |||
tableName: 't_homestead_fsss', | |||
fileType: 0, | |||
}; | |||
attachmentFind(cond).then(resp => { | |||
this.uploadImgList = resp.data.map(function(item){ | |||
return {id:item.id,url:'/api'+item.fileUrl,isImage: true} | |||
}); | |||
}); | |||
}, | |||
deleteFileImageList(file){ | |||
if(file.id !== undefined ){ | |||
systemAttachment(file.id); | |||
} | |||
}, | |||
// 图片上传前 | |||
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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
}) | |||
}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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
} | |||
}, | |||
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 = []; | |||
}, | |||
submitUploadList(val){ | |||
let f = [] | |||
for (let i of this.uploadImgList){ | |||
if(i.content !== undefined){ | |||
f.push(i.content) | |||
} | |||
} | |||
let _this = this; | |||
let file = { | |||
tableId:val, | |||
tableName:"t_homestead_fsss", | |||
bizPath:"upload", | |||
fileType:"0", | |||
files: f | |||
}; | |||
base64Attach(file).then((resp) => { | |||
this.$toast({ | |||
icon: 'success', // 找到自己需要的图标 | |||
message: '上传成功', | |||
duration:"1000", | |||
onClose:function(){ | |||
_this.showImageList = false | |||
} | |||
}) | |||
}); | |||
}, | |||
} | |||
} | |||
</script> | |||
@@ -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; | |||
@@ -5,14 +5,10 @@ | |||
<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> | |||
@@ -22,11 +18,11 @@ | |||
<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" /> | |||
<van-uploader accept="image/*" v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" /> | |||
</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-col span="12"><van-button type="primary" style="width:100px;" round @click="qkClick">清空</van-button></van-col> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList(zjdId)">上传</van-button></van-col> | |||
</van-row> | |||
</van-popup> | |||
<div style="display:flex;width:95%;margin:0 auto;justify-content:space-between;padding: 0px 0 15px"> | |||
@@ -95,6 +91,7 @@ | |||
<!-- <p v-if="item.zjdAudit=='1'" style="color:#7AC943;background:rgba(122,201,67,0.2);font-size:12px;padding: 5px;line-height: 1;border-radius: 5px;">已审核</p>--> | |||
<!-- <p v-if="item.zjdAudit=='2'" style="color:#ee0a24;font-size:12px;">已驳回</p>--> | |||
<p v-if="item.surveyStatus != '5' && item.surveyStatus != '3'" style="display: flex;align-items: center;color:#22B7F2;font-size:12px;margin-left: auto;margin-right: 10px;border-bottom: 1px dashed #22B7F2;" @click="setCookies(item)"><img src="../../assets/images/housesteadSurvey/list07.png" alt="" style="margin-right: 3px;">调查</p> | |||
<p style="margin-right: 3%;color:#22B7F2;font-size:12px;" ><van-icon name="photo-o" size=".4rem" style="bottom: -3px;" color="#000000" @click="showUploadList(item.id)"/> 附件</p> | |||
<p style="display: flex;align-items: center;color:#FA5353;font-size:12px;border-bottom: 1px dashed #FA5353;" @click="deleteZjd(item,index)"><img src="../../assets/images/housesteadSurvey/list08.png" alt="" style="margin-right: 3px;">删除</p> | |||
</div> | |||
</template> | |||
@@ -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; | |||
@@ -28,7 +28,7 @@ | |||
</van-row> | |||
</van-popup> | |||
<div style="display:flex;width:95%;margin:0 auto;justify-content:space-between;padding: 0px 0 15px"> | |||
<div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="$router.push({path:'/homesteadSurvey/list'})">入户</div> | |||
<div :class="{activeBtn : activeBtn==1,disactiveBtn :activeBtn!=1 }" @click="$router.push({path:'/homesteadSurvey/list'})">入户核查</div> | |||
<div :class="{activeBtn : activeBtn==2,disactiveBtn :activeBtn!=2 }" @click="$router.push({path:'/homesteadSurvey/list2'})">农户信息</div> | |||
<div :class="{activeBtn : activeBtn==3,disactiveBtn :activeBtn!=3 }" @click="$router.push({path:'/homesteadSurvey/list3'})">所有权人</div> | |||
<div :class="{activeBtn : activeBtn==4,disactiveBtn :activeBtn!=4 }" @click="$router.push({path:'/homesteadSurvey/list4'})">切换地图</div> | |||
@@ -583,6 +583,7 @@ | |||
审批通过<span style="display: inline-block;border:2px solid #9F4D95;height: 10px;width: 20px;vertical-align: middle;margin-left: 10px;"></span> | |||
</template> | |||
</van-checkbox> | |||
<hr width="122" style="border:1px dashed #AAAAAA"/> | |||
<van-checkbox name="fsssSx" shape="square" style="margin-bottom: 5px;" id="fsssSx"> | |||
<template #default> | |||
附属设施<span style="display: inline-block;background: #FF8C00;opacity: 0.5;height: 10px;width: 20px;vertical-align: middle;margin-left: 10px;"></span> | |||
@@ -5984,6 +5985,7 @@ | |||
//this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$cookies.set("search","") | |||
localStorage.setItem("zjdzdxxItem",JSON.stringify(this.mapZjdTeAll.mapZjdAData)); | |||
localStorage.setItem("executePermission",true); | |||
this.$router.push({path:'/homesteadSurvey/add'}); | |||
}else { | |||
this.$toast("已选择宅基地,请选择自然幢或附属设施按钮"); | |||
@@ -6003,6 +6005,7 @@ | |||
//this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$cookies.set("search","") | |||
localStorage.setItem("zjdzdxxItem",JSON.stringify(this.mapZjdData)); | |||
localStorage.setItem("executePermission",true); | |||
this.$router.push({name:'zrzAdd',query:this.mapZjdTeAll.mapZrzAData}); | |||
}else { | |||
this.$toast("请先在地图上选择宅基地后,再选择自然幢按钮"); | |||
@@ -6018,6 +6021,7 @@ | |||
//this.$cookies.set("search",this.mapZjdTeAll); | |||
this.$cookies.set("search","") | |||
localStorage.setItem("zjdzdxxItem",JSON.stringify(this.mapZjdData)); | |||
localStorage.setItem("executePermission",true); | |||
this.$router.push({name:'fsssAdd',query:this.mapZjdTeAll.mapFsssAData}); | |||
}else { | |||
this.$toast("请先在地图上选择宅基地后,再选择附属设施按钮"); | |||
@@ -44,7 +44,7 @@ | |||
</van-row> | |||
</div> | |||
</van-sticky> | |||
<van-form ref = "form"> | |||
<van-form ref = "form" label-width="auto"> | |||
<div style="margin:1.6rem auto;background: #ffffff;width: 95%;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);border-radius:15px;padding-top: 20px;"> | |||
<p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">农民房屋信息</p> | |||
<!--<van-field | |||
@@ -387,8 +387,68 @@ | |||
data-key="dictValue" | |||
placeholder="请选择房屋利用状况" | |||
remote-url="/open/zdzh/list/nmfwlyzk" | |||
@change="onFwlyzkChanged" | |||
:on-remote-response="'data'" | |||
/> | |||
<field-select | |||
v-if="showPhxx" | |||
v-model="form.phlyms" | |||
label="盘活利用模式" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
placeholder="请选择盘活利用模式" | |||
remote-url="/open/zdzh/list/phlyms" | |||
:on-remote-response="'data'" | |||
required | |||
:rules="[{ required: true, message: '' }]" | |||
/> | |||
<van-field | |||
v-if="showPhxx" | |||
input-align="right" | |||
v-model="form.nsy" | |||
name="年收益(元)" | |||
label="年收益(元)" | |||
placeholder="年收益" | |||
maxlength="50" | |||
autocomplete="off" | |||
type="number" | |||
required | |||
:rules="[{ required: true, message: '' }]" | |||
/> | |||
<van-field | |||
v-if="showXzxx" | |||
input-align="right" | |||
v-model="form.fwxzyy" | |||
name="房屋闲置原因" | |||
label="房屋闲置原因" | |||
placeholder="房屋闲置原因" | |||
maxlength="50" | |||
autocomplete="off" | |||
required | |||
:rules="[{ required: true, message: '' }]" | |||
/> | |||
<van-field | |||
v-if="showXzxx" | |||
autocomplete="off" | |||
input-align="right" | |||
v-model="form.fwxzkqsj" | |||
name="房屋闲置起始时间" | |||
label="房屋闲置起始时间" | |||
placeholder="房屋闲置起始时间" | |||
required | |||
:rules="[{ required: true, message: '' }]" | |||
readonly | |||
@click="showFwxzqssj = true" | |||
/> | |||
<van-popup v-model:show="showFwxzqssj" position="bottom"> | |||
<van-datetime-picker | |||
:value="new Date" | |||
type="date" | |||
title="选择年月日" | |||
@confirm="onConfirmFwxzqssj" | |||
@cancel="showFwxzqssj = false" | |||
/> | |||
</van-popup> | |||
<p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">抵押情况</p> | |||
<FieldRadio | |||
v-model="form.sfdy" | |||
@@ -558,11 +618,14 @@ export default { | |||
showCfjssj:false, | |||
showZwlvqssj:false, | |||
showZwlvjssj:false, | |||
showXzxx:false, | |||
showPhxx:false, | |||
zjdzdxxItem:{}, | |||
// 地图绘制 | |||
drawInsert: null, | |||
nhdmSearch:null, | |||
showDropList:false, | |||
showFwxzqssj:false, | |||
nhdmDictionaries:[], | |||
newList:[], | |||
// 当前位置信息 | |||
@@ -611,7 +674,18 @@ export default { | |||
if(this.form.jznd != null){ | |||
this.form.jznd = this.form.jznd.substr(0,10); | |||
} | |||
if(this.form.lyzk === "30"){ | |||
this.showXzxx = true; | |||
this.showPhxx = false; | |||
}else if(this.form.lyzk === "11"){ | |||
this.showXzxx = false; | |||
this.showPhxx = false; | |||
}else{ | |||
this.showPhxx = true; | |||
this.showXzxx = false; | |||
} | |||
} | |||
this.getList(); | |||
}, | |||
mounted(){ | |||
@@ -729,6 +803,24 @@ export default { | |||
this.getList() | |||
} | |||
}, | |||
onFwlyzkChanged(val){ | |||
console.info(val.dictValue); | |||
if(val.dictValue === "30"){ | |||
this.showXzxx = true; | |||
this.showPhxx = false; | |||
}else if(val.dictValue === "11"){ | |||
this.showXzxx = false; | |||
this.showPhxx = false; | |||
}else{ | |||
if(val.dictValue !== undefined) | |||
this.showPhxx = true; | |||
this.showXzxx = false; | |||
} | |||
}, | |||
onConfirmFwxzqssj(data){ | |||
this.form.fwxzkqsj = this.getNowFormatDate(data).substr(0,10); | |||
this.showFwxzqssj = false; | |||
}, | |||
/** 模糊查询人员信息 */ | |||
remoteTransfereeMethod(query) { | |||
if (query !== "") { | |||
@@ -65,7 +65,11 @@ | |||
<p style="flex:1;text-align:right;">{{item.nhdm}}</p> | |||
</div> | |||
<div style="text-align:center;overflow:auto;display: flex;justify-content: space-between;margin-top: 10px;"> | |||
<p style="width:32%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupnmfw(item)"> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid transparent;background: #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showUploadList(item.id)"> | |||
<van-icon name="photo-o" size=".4rem" color="#FFFFFF"/> | |||
<span style="font-size: 14px;color: #fff;margin-left: 5px;">附件</span> | |||
</p> | |||
<p style="width:49%;display: flex;align-items: center;justify-content:center;border: 1px solid #22B7F2;padding: 3px 0;border-radius: 50px;" @click="showPopupnmfw(item)"> | |||
<img src="../../assets/images/housesteadSurvey/add02.png" alt=""> | |||
<span style="font-size: 14px;color: #22B7F2;margin-left: 5px;">详情</span> | |||
</p> | |||
@@ -75,7 +79,18 @@ | |||
<van-button v-if="permission == 'true'" square text="删除" type="danger" class="delete-button" @click="deletenmfw(item)"/> | |||
</template> | |||
</van-swipe-cell> | |||
<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 accept="image/*" v-model="uploadImgList" :after-read="beforeReadImageList" @delete="deleteFileImageList" multiple :max-count="50" /> | |||
</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="qkClick">清空</van-button></van-col> | |||
<van-col span="12"><van-button type="primary" style="width:100px;" round @click="submitUploadList(zjdId)">上传</van-button></van-col> | |||
</van-row> | |||
</van-popup> | |||
<div v-if="permission == 'true'" style=" width:95%;margin:20px auto;display: flex;justify-content: space-between;"> | |||
<div style="width:100%;text-align:center;overflow:auto;border-radius: 16px;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);padding: 15px 0px;background: #ffffff;color: #22B7F2;"> | |||
<p style="font-size: 16px;" @click="showPopupAddnmfw()">+ 添加农民房屋</p> | |||
@@ -86,17 +101,12 @@ | |||
</template> | |||
<script> | |||
import {listZjdzd,getZjdzd,updateZjdzd,addZjdzd,uploadFile,getQueryLand,submitOnly} from "@/api/homesteadSurvey/zjdzd"; | |||
import MapGisDrawing from "@/components/Map/MapGisDrawing"; | |||
import {listZrz,addZrz,updateZrz,getZrzZjdDmList,delZrz,updateZrzStatus} from "@/api/homesteadSurvey/zrz"; | |||
import {listNmfw,addNmfw,updateNmfw,delNmfw} from "@/api/homesteadSurvey/nmfw"; | |||
import {listSuyqr,addSuyqr,updateSuyqr} from "@/api/homesteadSurvey/suyqr"; | |||
import {listNhhncy,addNhhncy,updateNhhncy,delNhhncy} from "@/api/homesteadSurvey/nhhncy"; | |||
import {addNh, delNh, exportNh, getNh, listNh, updateNh,setNhInfo} from "@/api/homesteadSurvey/nh"; | |||
import {listFsss,addFsss,updateFsss,delFsss,getFsssZjdDmList,updateFsssStatus} from "@/api/homesteadSurvey/fsss"; | |||
import { listTown, getTown } from "@/api/homesteadSurvey/town"; | |||
import { listVillage} from "@/api/homesteadSurvey/village"; | |||
import { sysConfig} from "@/api/homesteadSurvey/index"; | |||
import {uploadFile} from "@/api/homesteadSurvey/zjdzd"; | |||
import {attachmentFind} from "@/api/sunVillage_info/homestead/application"; | |||
import {systemAttachment} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||
import {base64Attach} from "@/api/user"; | |||
import { Notify, Dialog, Toast } from 'vant'; | |||
import axios from "axios"; | |||
export default { | |||
@@ -109,6 +119,10 @@ export default { | |||
permission:false, | |||
zrzData:{}, | |||
nmfwlist:[], | |||
showImageList:false, | |||
zjdId:null, | |||
uploadImgList:[], | |||
uploadImgList1:[], | |||
}; | |||
}, | |||
created(){ | |||
@@ -148,6 +162,139 @@ export default { | |||
showPopuphncy(val){ | |||
this.$router.push({name:'nhcyAdd',query:val}); | |||
}, | |||
showUploadList(id){ | |||
this.getAttachments(id); | |||
this.showImageList = true; | |||
this.zjdId = id; | |||
}, | |||
getAttachments(id) { | |||
this.uploadImgList = []; | |||
let cond = { | |||
tableId: id, | |||
tableName: 't_homestead_nmfw', | |||
fileType: 0, | |||
}; | |||
attachmentFind(cond).then(resp => { | |||
this.uploadImgList = resp.data.map(function(item){ | |||
return {id:item.id,url:'/api'+item.fileUrl,isImage: true} | |||
}); | |||
}); | |||
}, | |||
deleteFileImageList(file){ | |||
if(file.id !== undefined ){ | |||
systemAttachment(file.id); | |||
} | |||
}, | |||
// 图片上传前 | |||
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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
}) | |||
}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/5 | |||
let cw = img.width/5 | |||
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); | |||
} | |||
} | |||
}, | |||
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 = []; | |||
}, | |||
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_nmfw", | |||
bizPath:"upload", | |||
fileType:"0", | |||
files: f | |||
}; | |||
base64Attach(file).then((resp) => { | |||
this.$toast({ | |||
icon: 'success', // 找到自己需要的图标 | |||
message: '上传成功', | |||
duration:"1000", | |||
onClose:function(){ | |||
_this.showImageList = false | |||
} | |||
}) | |||
}); | |||
}, | |||
deletenmfw(val){ | |||
const ids = val.id || this.ids; | |||
Dialog.confirm({ | |||
@@ -54,7 +54,7 @@ | |||
<van-field v-model="userName" label="账号" readonly /> | |||
<van-field v-model="nickName" label="昵称" readonly/> | |||
<van-row style="text-align: center;margin-top: 40px"> | |||
<van-button round block color="#7AC943" @click="submit">保存</van-button> | |||
<van-button round block color="#7AC943" @click="cancelMessage">关闭</van-button> | |||
</van-row> | |||
</van-cell-group> | |||
</van-popup> | |||
@@ -107,6 +107,9 @@ | |||
this.userName = this.$store.getters.name; | |||
this.nickName = this.$store.getters.nickName; | |||
this.showMessage = true; | |||
}, | |||
cancelMessage(){ | |||
this.showMessage = false; | |||
}, | |||
submit() { | |||
if(this.confirmPassword | |||
@@ -44,7 +44,7 @@ | |||
</van-row> | |||
</div> | |||
</van-sticky> | |||
<van-form ref = "form"> | |||
<van-form ref = "form" label-width="auto"> | |||
<div style="margin:1.6rem auto;background: #ffffff;width: 95%;box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16);border-radius:15px;padding-top: 20px;"> | |||
<p class="title" style="position:relative;padding-left:10px;line-height:20px;font-size: 16px;margin-left: 3%;margin-bottom: 5px;">使用权人信息</p> | |||
<!--<van-field | |||
@@ -237,34 +237,26 @@ | |||
remote-url="/open/zdzh/list/gmjjhy" | |||
:on-remote-response="'data'" | |||
/> | |||
<field-select | |||
v-model="form.gj" | |||
label="国家/地区" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
placeholder="请选择国家/地区" | |||
remote-url="/open/zdzh/list/country_or_region" | |||
:on-remote-response="'data'" | |||
:rules="[{ required: true }]" | |||
required | |||
/> | |||
<field-select | |||
v-model="form.hjszss" | |||
label="户籍所在省市" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
placeholder="请选择户籍所在省市" | |||
remote-url="/open/zdzh/list/province_code" | |||
:on-remote-response="'data'" | |||
/> | |||
<FieldRadio | |||
v-model="form.sfsyqrzjgy" | |||
label="使用权人之间共有" | |||
value-key="dictLabel" | |||
data-key="dictValue" | |||
label-width="auto" | |||
remote-url="/open/zdzh/list/house_yes_no" | |||
@change="onShyqrgyChanged" | |||
:on-remote-response="'data'" | |||
/> | |||
<van-field | |||
v-if="ftzdmjShow" | |||
input-align="right" | |||
type="number" | |||
v-model="form.ftzdmj" | |||
name="分摊宗地面积(m²)" | |||
label="分摊宗地面积(m²)" | |||
placeholder="请输入分摊宗地面积" | |||
autocomplete="off" | |||
/> | |||
<field-select | |||
v-model="form.gyfs" | |||
label="共有方式" | |||
@@ -274,6 +266,7 @@ | |||
remote-url="/open/zdzh/list/common_mode" | |||
:on-remote-response="'data'" | |||
/> | |||
<FieldRadio | |||
v-model="form.sfczr" | |||
label="持证人" | |||
@@ -348,6 +341,7 @@ export default { | |||
shownhdm:false, | |||
showDropList:false, | |||
shownmfwdm:false, | |||
ftzdmjShow:false, | |||
nhdmSearch:null, | |||
hzxm:null, | |||
landStatus:"1", | |||
@@ -382,6 +376,11 @@ export default { | |||
this.nmfwDictionaries = response.rows; | |||
}); | |||
} | |||
if(this.form.sfsyqrzjgy === "1"){ | |||
this.ftzdmjShow = true; | |||
}else{ | |||
this.ftzdmjShow = false; | |||
} | |||
this.$set(this.form, 'zjddm', this.zjdzdxx.zjddm); | |||
listZjdzd({zjddm:this.zjdzdxx.zjddm}).then(response => { | |||
this.form.bdcdyh = response.rows[0].bdcdyh; | |||
@@ -500,6 +499,13 @@ export default { | |||
Dialog({ type: 'danger', message: '请填写完整的表单项' }); | |||
}); | |||
}, | |||
onShyqrgyChanged(val){ | |||
if(val === '1'){ | |||
this.ftzdmjShow = true; | |||
}else{ | |||
this.ftzdmjShow = false; | |||
} | |||
}, | |||
mapLook(){ | |||
this.mapShow = true; | |||
setTimeout(() => { | |||
@@ -1339,7 +1339,8 @@ | |||
<van-col span="5">竣工<br/>平面<br/>简图<br/> | |||
(标注<br/>长宽<br/>及四至)</van-col> | |||
<van-col span="19"> | |||
<MultiImageUploadComp :value="applicationDetail.ydjfys.jgpmjt" :uploadDisabled="!formEnabled.acceptingForm.baseFormEnabled" @fileUpdate="fileUpdatePmt"/> | |||
<MultiImageUploadComp :value="applicationDetail.ydjfys.jgpmjt" :uploadDisabled="this.formEnabled.acceptingForm.baseFormEnabled" @fileUpdate="fileUpdatePmt"/> | |||
<van-field required :readonly="!this.formEnabled.acceptingForm.baseFormEnabled" v-model="applicationDetail.ydjfys.jgpmjtjbr" placeholder="经办人" label="经办人" input-align="left" :rules="[{ required: true }]"/> | |||
</van-col> | |||
</van-row> | |||
@@ -2303,6 +2304,7 @@ export default { | |||
; | |||
this.formVisible.acceptingForm.agricultureFormVisible = this.isProposeStatus(homeApplyStatus, ["79", "7C", "7F"]); | |||
this.formVisible.acceptingForm.nature_resourceFormVisible = this.isProposeStatus(homeApplyStatus, ["79", "7C", "7F"]); | |||
this.formVisible.acceptingForm.buildingFormVisible = this.isProposeStatus(homeApplyStatus, ["79", "7C", "7F"]); | |||
if (this.type == 'done') { | |||
this.formVisible.editVisible = false; | |||
} | |||
@@ -3700,27 +3702,28 @@ export default { | |||
break; | |||
} | |||
comment = this.applicationDetail.ydjfys.xzzfysyj; | |||
if (this.$refs.pictureUploadAccepting && _this.$refs.pictureUploadAccepting.isValid()) { | |||
if (this.applicationDetail.ydjfys.jgpmjt != null) { | |||
saveHomeBaseInfo(this.applicationDetail).then((response) => { | |||
this.complete(pass, comment); | |||
}).catch(err => { | |||
this.notify('保存失败', 'danger'); | |||
}); | |||
}else{ | |||
if (this.checkString(this.applicationDetail.tHouseApplyEnd.locationPlan)) { | |||
msg = "竣工平面简图不能为空"; | |||
} | |||
} | |||
break; | |||
default: | |||
comment = '同意'; | |||
saveHomeBaseInfo(this.applicationDetail).then((response) => { | |||
this.complete(pass, comment); | |||
}).catch(err => { | |||
this.notify('保存失败', 'danger'); | |||
}); | |||
if (this.applicationDetail.ydjfys.jgpmjt != null) { | |||
saveHomeBaseInfo(this.applicationDetail).then((response) => { | |||
this.complete(pass, comment); | |||
}).catch(err => { | |||
this.notify('保存失败', 'danger'); | |||
}); | |||
}else{ | |||
msg = "竣工平面简图不能为空"; | |||
} | |||
break; | |||
} | |||
if (msg) { | |||