|
|
|
@ -66,10 +66,13 @@
|
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<!-- <el-button @click="importData" |
|
|
|
|
><img src="@public/img/land/u1401.png" />导入</el-button |
|
|
|
|
> --> |
|
|
|
|
<input type="file" @change="importData" /> |
|
|
|
|
<el-upload |
|
|
|
|
class="upload-demo" |
|
|
|
|
action="" |
|
|
|
|
:before-upload="importData" |
|
|
|
|
> |
|
|
|
|
<el-button size="medium" type="primary">导入数据</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-tooltip |
|
|
|
@ -1746,16 +1749,17 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
//导入数据 |
|
|
|
|
importData(e) { |
|
|
|
|
const file = e.target.files[0]; |
|
|
|
|
const file = e; |
|
|
|
|
let formData = new FormData(); |
|
|
|
|
formData.append("uploadFile", file); |
|
|
|
|
importFile(formData).then((res) => { |
|
|
|
|
console.log(res); |
|
|
|
|
if (res.data.success) { |
|
|
|
|
this.$message("导入成功"); |
|
|
|
|
this.onSubmit(); |
|
|
|
|
return true |
|
|
|
|
} else { |
|
|
|
|
this.$message("导入失败"); |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -1782,7 +1786,7 @@ export default {
|
|
|
|
|
this.onlyId = row.landListedId; |
|
|
|
|
this.queryLonLatList(row.landListedId); |
|
|
|
|
this.queryRecordList(row.landListedId); |
|
|
|
|
this.queryFileList() |
|
|
|
|
this.queryFileList(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 删除单个 |
|
|
|
@ -2087,7 +2091,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
let param = { |
|
|
|
|
landListedId: landListedId, |
|
|
|
|
// fileType: this.activeType, |
|
|
|
|
fileType: this.activeType, |
|
|
|
|
}; |
|
|
|
|
queryFileList(param).then((res) => { |
|
|
|
|
if (res.data.success) { |
|
|
|
@ -2106,8 +2110,8 @@ export default {
|
|
|
|
|
tabChange() { |
|
|
|
|
// console.log(this.activeType); |
|
|
|
|
// 清空上传文件 |
|
|
|
|
// this.uploadFiles = []; |
|
|
|
|
// this.queryFileList(); |
|
|
|
|
this.uploadFiles = []; |
|
|
|
|
this.queryFileList(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 上传文件 |
|
|
|
@ -2124,16 +2128,16 @@ export default {
|
|
|
|
|
filePath: tempData.path, |
|
|
|
|
fileType: this.activeType, |
|
|
|
|
// uploadProcess: 0, |
|
|
|
|
landListedId:this.onlyId |
|
|
|
|
landListedId: this.onlyId, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//全部上传 |
|
|
|
|
allUpload(){ |
|
|
|
|
allFileUpload(this.uploadFiles).then(res =>{ |
|
|
|
|
this.queryFileList() |
|
|
|
|
}) |
|
|
|
|
allUpload() { |
|
|
|
|
allFileUpload(this.uploadFiles).then((res) => { |
|
|
|
|
this.queryFileList(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 上传资料 |
|
|
|
|
uploadRes(row) { |
|
|
|
|