Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev

shibei_master
13176889840 4 years ago
parent
commit
b82e867eaa
  1. 48
      src/views/modules/base/community/buildTable.vue
  2. 6
      src/views/modules/base/community/community.vue
  3. 57
      src/views/modules/base/community/communityTable.vue
  4. 32
      src/views/modules/base/community/roomTable.vue
  5. 2
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  6. 1
      src/views/modules/visual/communityGovern/processAnalyze.vue
  7. 6
      src/views/modules/visual/components/screen-map/index.vue

48
src/views/modules/base/community/buildTable.vue

@ -215,7 +215,7 @@ export default {
if (fromTree) { if (fromTree) {
this.agencyObj = treeObj this.agencyObj = treeObj
} }
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist" const url = "/gov/org/building/buildinglist"
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
@ -377,14 +377,14 @@ export default {
handleExportModule (type) { handleExportModule (type) {
let title = '' let title = ''
let url = "/gov/org/neighborhood/exporttemplate" let url = ""
if (type === 'building') { if (type === 'building') {
title = '楼宇导入模板' title = '楼宇导入模板'
url = '' url = '/gov/org/building/exporttemplate'
} else if (type === 'room') { } else if (type === 'room') {
title = '房导入模板' title = '房导入模板'
url = '' url = '/gov/org/house/exporttemplate'
} }
@ -440,35 +440,45 @@ export default {
let params = {} let params = {}
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
params.file = fileFormData // params.file = fileFormData
params.orgId = this.agencyObj.id // params.orgId = this.agencyObj.id
params.orgType = this.agencyObj.level // params.orgType = this.agencyObj.level
if (type === 'building') { if (type === 'building') {
this.$refs['upload_building'].clearFiles() this.$refs['upload_building'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport'
url = '/gov/org/building/buildingimport' url = '/gov/org/building/buildingimport'
} else if (type === 'room') { } else if (type === 'room') {
this.$refs['upload_room'].clearFiles() 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'
} }
this.startLoading()
const { data, code, msg } = await requestPost(url, fileFormData) window.app.ajax.post2(url, fileFormData,
if (code === 0) { (data, rspMsg) => {
this.endLoading()
this.$message({ if (data.code === 0 || data.code > 8000) {
type: "success", // this.$message({
message: "导入成功" // type: "success",
}); // message: ""
// });
this.$message.success(rspMsg)
this.$emit('refreshTree') this.$emit('refreshTree')
this.loadTable() this.loadTable()
} else { } else {
this.$message.error(msg) this.$message.error(rspMsg)
} }
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },

6
src/views/modules/base/community/community.vue

@ -27,7 +27,7 @@
<div :style="{height:rowHeight}" <div :style="{height:rowHeight}"
class="div_table"> class="div_table">
<build-table v-if="selTreeObj.level==='neighbourHood'" <build-table v-if="selTreeObj.level==='neighborHood'"
ref="ref_neighTable" ref="ref_neighTable"
@toNextLevel="toNextLevel" @toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table> @refreshTree="refreshTree"></build-table>
@ -151,7 +151,7 @@ export default {
if (obj.level === 'building') {// if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj) 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) this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj)
} else { } else {
@ -200,7 +200,7 @@ export default {
obj.communityId = communityNode.data.id obj.communityId = communityNode.data.id
obj.communityName = communityNode.data.label 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 gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid) let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)

57
src/views/modules/base/community/communityTable.vue

@ -39,6 +39,8 @@
type="green" type="green"
size="small" size="small"
@click="handleAdd">新增小区</el-button> @click="handleAdd">新增小区</el-button>
<div class="btn_upload"
v-if="agencyObj.level==='community'||agencyObj.level==='grid'">
<el-button style="" <el-button style=""
type="blue" type="blue"
size="small" size="small"
@ -91,6 +93,7 @@
size="small" size="small"
type="red">导入房屋数据</el-button> type="red">导入房屋数据</el-button>
</el-upload> </el-upload>
</div>
</div> </div>
@ -237,7 +240,7 @@ export default {
if (fromTree) { if (fromTree) {
this.agencyObj = treeObj this.agencyObj = treeObj
} }
// console.log(this.agencyObj) console.log(this.agencyObj)
const url = "/gov/org/neighborhood/neighborhoodlist" const url = "/gov/org/neighborhood/neighborhoodlist"
let params = { let params = {
@ -399,18 +402,18 @@ export default {
handleExportModule (type) { handleExportModule (type) {
let title = '' let title = ''
let url = "/gov/org/neighborhood/exporttemplate" let url = ""
if (type === 'community') { if (type === 'community') {
title = '小区导入模板' title = '小区导入模板'
url = '' url = '/gov/org/neighborhood/exporttemplate'
} else if (type === 'building') { } else if (type === 'building') {
title = '楼宇导入模板' title = '楼宇导入模板'
url = '' url = '/gov/org/building/exporttemplate'
} else if (type === 'room') { } else if (type === 'room') {
title = '房间导入模板' title = '房间导入模板'
url = '' url = '/gov/org/house/exporttemplate'
} }
let params = {} let params = {}
@ -461,13 +464,13 @@ export default {
// //
let url = '' let url = ''
let params = {}
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip
params.file = fileFormData
params.orgId = this.agencyObj.id
params.orgType = this.agencyObj.level === 'grid' ? 'grid' : 'agency'
if (type === 'community') { if (type === 'community') {
@ -482,24 +485,31 @@ export default {
} else if (type === 'room') { } else if (type === 'room') {
this.$refs['upload_room'].clearFiles() this.$refs['upload_room'].clearFiles()
url = '/gov/org/ichouse/houseimport' url = '/gov/org/house/houseimport'
} }
this.startLoading()
window.app.ajax.post2(url, fileFormData,
const { data, code, msg } = await requestPost(url, params) (data, rspMsg) => {
this.endLoading()
if (code === 0) { if (data.code === 0 || data.code > 8000) {
this.$message({ // this.$message({
type: "success", // type: "success",
message: "导入成功" // message: ""
}); // });
this.$message.success(rspMsg)
this.$emit('refreshTree') this.$emit('refreshTree')
this.loadTable() this.loadTable()
} else { } else {
// debugger this.$message.error(rspMsg)
// this.$message.error(msg)
} }
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },
@ -587,6 +597,11 @@ export default {
.div_btn { .div_btn {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
.btn_upload {
margin-left: 10px;
display: flex;
}
} }
.el-row { .el-row {

32
src/views/modules/base/community/roomTable.vue

@ -417,27 +417,33 @@ export default {
// //
this.$refs['upload'].clearFiles() this.$refs['upload'].clearFiles()
var url = '/gov/org/ichouse/houseimport' var url = '/gov/org/house/houseimport'
let params = {}
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
params.file = fileFormData this.startLoading()
params.orgId = this.agencyObj.id window.app.ajax.post2(url, fileFormData,
params.orgType = this.agencyObj.level (data, rspMsg) => {
this.endLoading()
const { data, code, msg } = await requestPost(url, fileFormData) if (data.code === 0 || data.code > 8000) {
if (code === 0) { // this.$message({
this.$message({ // type: "success",
type: "success", // message: ""
message: "导入成功" // });
}); this.$message.success(rspMsg)
this.$emit('refreshTree') this.$emit('refreshTree')
this.loadTable() this.loadTable()
} else { } else {
this.$message.error(msg) this.$message.error(rspMsg)
} }
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },

2
src/views/modules/visual/communityGovern/distributionAnalyze.vue

@ -475,6 +475,7 @@ export default {
}, },
// 线 // 线
async getLineChart () { async getLineChart () {
if (!this.showNoData) { if (!this.showNoData) {
this.$refs.lineChart.clear() this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading() this.$refs.lineChart.showLoading()
@ -527,6 +528,7 @@ export default {
//线 //线
loadCategoryData () { loadCategoryData () {
this.xaxis = [] this.xaxis = []
this.series = [] this.series = []
this.legend = [] this.legend = []

1
src/views/modules/visual/communityGovern/processAnalyze.vue

@ -424,6 +424,7 @@ export default {
}, },
loadMap () { loadMap () {
if (this.isfirstInit) { if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
// this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000) // this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000)

6
src/views/modules/visual/components/screen-map/index.vue

@ -227,6 +227,7 @@ const vueGis = {
// //
async refreshMap (polygonArray, iconArrays) { async refreshMap (polygonArray, iconArrays) {
this.polygonArray = polygonArray this.polygonArray = polygonArray
this.iconArrays = iconArrays this.iconArrays = iconArrays
@ -354,9 +355,10 @@ const vueGis = {
if (this.iconArrays && this.iconArrays.length > 0) { if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = []; let iconFeatures = [];
let iconArraysNew = []
this.iconArrays.forEach((oneIcon, index) => { this.iconArrays.forEach((oneIcon, index) => {
// //
let iconItem = new Feature({ let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]), geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
id: oneIcon.id, id: oneIcon.id,
@ -377,6 +379,7 @@ const vueGis = {
}); });
iconItem.setStyle(iconStyle); iconItem.setStyle(iconStyle);
if (this.distanceMax) { if (this.distanceMax) {
if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) { if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
iconFeatures.push(iconItem); iconFeatures.push(iconItem);
@ -414,7 +417,6 @@ const vueGis = {
// console.log(distance) // console.log(distance)
return (distance < max || distance === max) return (distance < max || distance === max)
// debugger // debugger
// return // return
// var wgs84Sphere = new ol.Sphere(6378137); // var wgs84Sphere = new ol.Sphere(6378137);

Loading…
Cancel
Save