Browse Source

拟挂牌经纬度导入修改

develop
王健 4 years ago
parent
commit
17389a4a89
  1. 8
      src/views/land/api/noLand.js
  2. 29
      src/views/land/noneHandLand/newLand.vue

8
src/views/land/api/noLand.js

@ -183,6 +183,14 @@ export function updateLonLat(param) {
})
}
export function importLonLat(data) {
return request({
url: '/api/landtolistlonlat/importLandToListLatExcel',
method: 'post',
data: data,
})
}
// 通过ID删除拟挂牌地块
export function delLandLonLat(landListedId) {
return request({

29
src/views/land/noneHandLand/newLand.vue

@ -984,14 +984,19 @@
>+添加一行</el-button
>
</el-row>
<!-- <el-row style="text-align: center">-->
<!-- <el-button type="text" style="color: gray">导入</el-button>-->
<!-- </el-row>-->
<el-row>
<el-col :span="8"> </el-col>
<el-col :span="8"> </el-col>
<el-col :span="8" style="text-align: right">
<el-button v-show="!readOnly" type="primary">导入</el-button>
<el-upload
v-show="!readOnly"
style="margin-right: 10px"
action=""
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
:before-upload="uploadLonLat"
>
<el-button size="medium" type="primary">导入</el-button>
</el-upload>
</el-col>
</el-row>
</el-collapse-item>
@ -1171,6 +1176,7 @@ import {
fetchNoHandLandList,
saveNoHandLandList,
delNoHandLandObj,
importLonLat,
exportHandLandListExcel,
downloadNoHandLandTemplate,
queryLonLatList,
@ -1920,6 +1926,21 @@ export default {
}
});
},
uploadLonLat(e) {
const file = e;
let formData = new FormData();
formData.append("uploadFile", file);
importLonLat(formData).then((res) => {
if (res.data.success) {
this.queryLonLatList(this.onlyId);
return false;
} else {
this.$message.error("导入失败");
return false;
}
});
return false;
},
//
addOneRowForLonLat(type) {

Loading…
Cancel
Save