diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue
index 3a04cd3d2..70d61677c 100644
--- a/src/views/modules/base/community/buildTable.vue
+++ b/src/views/modules/base/community/buildTable.vue
@@ -215,7 +215,7 @@ export default {
if (fromTree) {
this.agencyObj = treeObj
}
-
+ console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist"
let params = {
pageSize: this.pageSize,
@@ -380,11 +380,11 @@ export default {
let url = "/gov/org/neighborhood/exporttemplate"
if (type === 'building') {
title = '楼宇导入模板'
- url = ''
+ url = '/gov/org/neighborhood/exporttemplate'
} else if (type === 'room') {
- title = '房间导入模板'
- url = ''
+ title = '房屋导入模板'
+ url = '/gov/org/house/exporttemplate'
}
@@ -440,35 +440,46 @@ export default {
let params = {}
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
- params.file = fileFormData
- params.orgId = this.agencyObj.id
- params.orgType = this.agencyObj.level
+ // params.file = fileFormData
+ // params.orgId = this.agencyObj.id
+ // params.orgType = this.agencyObj.level
if (type === 'building') {
this.$refs['upload_building'].clearFiles()
- url = '/gov/org/building/buildingimport'
+ url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport'
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
- url = '/gov/org/ichouse/houseimport'
+ // url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport'
+ url = '/gov/org/house/houseimport'
}
- const { data, code, msg } = await requestPost(url, fileFormData)
- if (code === 0) {
- this.$message({
- type: "success",
- message: "导入成功"
- });
- this.$emit('refreshTree')
- this.loadTable()
- } else {
- this.$message.error(msg)
- }
+ window.app.ajax.post2(url, fileFormData,
+ (data, rspMsg) => {
+
+ if (data.code === 0 || data.code > 8000) {
+ // this.$message({
+ // type: "success",
+ // message: "导入成功"
+ // });
+ this.$message.success(rspMsg)
+ this.$emit('refreshTree')
+ this.loadTable()
+ } else {
+ this.$message.error(rspMsg)
+ }
+ },
+ (rspMsg, data) => {
+
+ this.$message.error(rspMsg)
+ }, { headers: { 'Content-Type': 'multipart/form-data' } })
},
diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue
index 41005ba13..14254aa9d 100644
--- a/src/views/modules/base/community/community.vue
+++ b/src/views/modules/base/community/community.vue
@@ -27,7 +27,7 @@
-
@@ -151,7 +151,7 @@ export default {
if (obj.level === 'building') {//点击楼栋
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj)
- } else if (obj.level === 'neighbourHood') {//点击小区
+ } else if (obj.level === 'neighborHood') {//点击小区
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj)
} else {
@@ -200,7 +200,7 @@ export default {
obj.communityId = communityNode.data.id
obj.communityName = communityNode.data.label
- } else if (obj.level === 'neighbourHood') {//点击小区
+ } else if (obj.level === 'neighborHood') {//点击小区
let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)
diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue
index 118bf4012..3293431a4 100644
--- a/src/views/modules/base/community/communityTable.vue
+++ b/src/views/modules/base/community/communityTable.vue
@@ -39,58 +39,61 @@
type="green"
size="small"
@click="handleAdd">新增小区
- 下载小区模板
-
-
-
+ 导入小区数据
-
-
- 下载楼宇模板
-
-
- 下载小区模板
+
+
+ 导入小区数据
+
+
+ 导入楼宇数据
-
- 下载房屋模板
-
-
- 下载楼宇模板
+
+
+ 导入楼宇数据
+
+ 导入房屋数据
-
+ @click="handleExportModule('room')">下载房屋模板
+
+
+ 导入房屋数据
+
+
@@ -237,7 +240,7 @@ export default {
if (fromTree) {
this.agencyObj = treeObj
}
- // console.log(this.agencyObj)
+ console.log(this.agencyObj)
const url = "/gov/org/neighborhood/neighborhoodlist"
let params = {
@@ -461,13 +464,13 @@ export default {
//清空上传列表
let url = ''
- let params = {}
+
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+
- params.file = fileFormData
- params.orgId = this.agencyObj.id
- params.orgType = this.agencyObj.level === 'grid' ? 'grid' : 'agency'
if (type === 'community') {
@@ -482,24 +485,29 @@ export default {
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
- url = '/gov/org/ichouse/houseimport'
+ url = '/gov/org/house/houseimport'
}
+ window.app.ajax.post2(url, fileFormData,
+ (data, rspMsg) => {
+ if (data.code === 0 || data.code > 8000) {
+ // this.$message({
+ // type: "success",
+ // message: "导入成功"
+ // });
+ this.$message.success(rspMsg)
+ this.$emit('refreshTree')
+ this.loadTable()
+ } else {
+ this.$message.error(rspMsg)
+ }
+ },
+ (rspMsg, data) => {
+ this.$message.error(rspMsg)
+ }, { headers: { 'Content-Type': 'multipart/form-data' } })
- const { data, code, msg } = await requestPost(url, params)
- if (code === 0) {
- this.$message({
- type: "success",
- message: "导入成功"
- });
- this.$emit('refreshTree')
- this.loadTable()
- } else {
- // debugger
- // this.$message.error(msg)
- }
},
@@ -587,6 +595,11 @@ export default {
.div_btn {
display: flex;
margin-top: 20px;
+
+ .btn_upload {
+ margin-left: 10px;
+ display: flex;
+ }
}
.el-row {
diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue
index 44e0be776..41054abf2 100644
--- a/src/views/modules/base/community/roomTable.vue
+++ b/src/views/modules/base/community/roomTable.vue
@@ -417,27 +417,33 @@ export default {
//清空上传列表
this.$refs['upload'].clearFiles()
- var url = '/gov/org/ichouse/houseimport'
+ var url = '/gov/org/house/houseimport'
- let params = {}
let fileFormData = new FormData();
fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
+ fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名
- params.file = fileFormData
- params.orgId = this.agencyObj.id
- params.orgType = this.agencyObj.level
- const { data, code, msg } = await requestPost(url, fileFormData)
- if (code === 0) {
- this.$message({
- type: "success",
- message: "导入成功"
- });
- this.$emit('refreshTree')
- this.loadTable()
- } else {
- this.$message.error(msg)
- }
+ window.app.ajax.post2(url, fileFormData,
+ (data, rspMsg) => {
+
+ if (data.code === 0 || data.code > 8000) {
+ // this.$message({
+ // type: "success",
+ // message: "导入成功"
+ // });
+ this.$message.success(rspMsg)
+ this.$emit('refreshTree')
+ this.loadTable()
+ } else {
+ this.$message.error(rspMsg)
+ }
+ },
+ (rspMsg, data) => {
+
+ this.$message.error(rspMsg)
+ }, { headers: { 'Content-Type': 'multipart/form-data' } })
},
diff --git a/src/views/modules/visual/communityGovern/distributionAnalyze.vue b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
index b2ef76855..206f3ca04 100644
--- a/src/views/modules/visual/communityGovern/distributionAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
@@ -475,6 +475,7 @@ export default {
},
// 获取折线图
async getLineChart () {
+
if (!this.showNoData) {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
@@ -527,6 +528,7 @@ export default {
//解析折线图数据
loadCategoryData () {
+
this.xaxis = []
this.series = []
this.legend = []
diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue
index c3ebd7a47..ebcb149d8 100644
--- a/src/views/modules/visual/communityGovern/processAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/processAnalyze.vue
@@ -424,6 +424,7 @@ export default {
},
loadMap () {
+
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
// this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000)
diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue
index df996b483..2786fdde8 100644
--- a/src/views/modules/visual/components/screen-map/index.vue
+++ b/src/views/modules/visual/components/screen-map/index.vue
@@ -227,6 +227,7 @@ const vueGis = {
//刷新地图
async refreshMap (polygonArray, iconArrays) {
+
this.polygonArray = polygonArray
this.iconArrays = iconArrays
@@ -354,9 +355,10 @@ const vueGis = {
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
- let iconArraysNew = []
+
this.iconArrays.forEach((oneIcon, index) => {
//添加标注
+
let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
id: oneIcon.id,
@@ -377,6 +379,7 @@ const vueGis = {
});
iconItem.setStyle(iconStyle);
+
if (this.distanceMax) {
if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
iconFeatures.push(iconItem);
@@ -414,7 +417,6 @@ const vueGis = {
// console.log(distance)
return (distance < max || distance === max)
-
// debugger
// return
// var wgs84Sphere = new ol.Sphere(6378137);