From be57eee05489489e19241c9a397ce7e722553e60 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 11 Feb 2022 17:18:29 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E6=88=B7=E6=95=B0=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=80=BB=E6=88=B7=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/buildForm.vue | 8 ++++---- src/views/modules/base/community/buildTable.vue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/modules/base/community/buildForm.vue b/src/views/modules/base/community/buildForm.vue index d144e2706..cdea08eb8 100644 --- a/src/views/modules/base/community/buildForm.vue +++ b/src/views/modules/base/community/buildForm.vue @@ -61,14 +61,14 @@ :min="0" label="层数"> - + label="总户数"> + label="总户数"> Date: Sat, 12 Feb 2022 16:09:14 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/communityTable.vue | 68 +++++++++++++++---- 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 4608b461c..b102f1e13 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -31,23 +31,42 @@ @click="handleSearch">查询
- 导出 - 新增小区 - 下载小区模板 + 导入小区数据 + + + 下载楼宇模板 + + 导入小区数据 + type="red">导入楼宇数据 + + 下载房屋模板 + + + 导入房屋数据
@@ -338,7 +376,7 @@ export default { }, // 下载文件 - download (data, fileName) { + download (data, downFileName) { if (!data) { return } @@ -346,7 +384,7 @@ export default { var csvData = new Blob([data]) if (window.navigator && window.navigator.msSaveOrOpenBlob) { - window.navigator.msSaveOrOpenBlob(csvData, fileName); + window.navigator.msSaveOrOpenBlob(csvData, downFileName); } // for Non-IE (chrome, firefox etc.) else { @@ -355,7 +393,7 @@ export default { a.style = 'display: none'; var url = window.URL.createObjectURL(csvData); a.href = url; - a.download = fileName; + a.download = downFileName; a.click(); a.remove(); window.URL.revokeObjectURL(url); @@ -384,7 +422,7 @@ export default { }, // 上传文件之前的钩子 - beforeUpload (file) { + beforeUpload (file, type) { this.files = file; const isText = file.type === 'application/vnd.ms-excel' @@ -392,6 +430,8 @@ export default { if (!isText && !isTextComputer) { this.$message.error('请选择正确格式的文件') + this.files = null + this.fileName = '' return false } else { this.fileName = file.name; @@ -401,16 +441,17 @@ export default { }, // 上传文件个数超过定义的数量 handleExceed (files, fileList) { + this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) }, async uploadFile () { - this.loading = true if (this.fileName == "") { - this.$message.warning('请选择要上传的文件!') + return false } + this.loading = true //清空上传列表 this.$refs['upload'].clearFiles() @@ -420,6 +461,7 @@ export default { fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 const { data, code, msg } = await requestPost(url, fileFormData) + if (code === 0) { this.$message({ type: "success", @@ -428,7 +470,8 @@ export default { this.$emit('refreshTree') this.loadTable() } else { - this.$message.error(msg) + // debugger + // this.$message.error(msg) } @@ -516,6 +559,7 @@ export default { } .div_btn { + display: flex; margin-top: 20px; } From ada44f69dfff19cf920e2c5d37202e5563d6ec5c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Sat, 12 Feb 2022 16:09:37 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/communityTable.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index b102f1e13..211b44eac 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -474,7 +474,6 @@ export default { // this.$message.error(msg) } - }, handleSizeChange (val) { From 0970210d7acd28cbc08ea62431ff2fed15b0398d Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Sat, 12 Feb 2022 17:04:34 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/warning/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/visual/warning/index.vue b/src/views/modules/visual/warning/index.vue index 587263bab..3d3c3cde9 100644 --- a/src/views/modules/visual/warning/index.vue +++ b/src/views/modules/visual/warning/index.vue @@ -133,7 +133,7 @@ export default { item.gridName, item.neighborhoodName, item.buildingName, - item.userList, + item.userList || [], ]); }); this.tableData = tableData; From ff8d6a1cfa62083be4fda2c34aaff956d062673a Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Sat, 12 Feb 2022 17:06:31 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/warning/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/visual/warning/index.vue b/src/views/modules/visual/warning/index.vue index 3d3c3cde9..269a0369d 100644 --- a/src/views/modules/visual/warning/index.vue +++ b/src/views/modules/visual/warning/index.vue @@ -133,7 +133,7 @@ export default { item.gridName, item.neighborhoodName, item.buildingName, - item.userList || [], + item.userList || '暂无', ]); }); this.tableData = tableData; From 615857a60490cb7895c9cbb4018428baf46d71e7 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 14 Feb 2022 14:08:28 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=9A=E5=91=98?= =?UTF-8?q?=E9=A3=8E=E9=87=87=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityParty/elegant/index.vue | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index 422df400c..1bb3dfc43 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -13,6 +13,16 @@
+ + + + + + + + + + + + @@ -215,6 +235,8 @@ export default { value: '', optionsEditG: [], optionsG: [], + optionsC: [], + optionsEditC: [], options: [ { label: '是', @@ -238,6 +260,12 @@ export default { columnName: 'gridName', width: '300', options: [] + }, { + label: '分类类别', + align: 'center', + columnName: 'categoryName', + width: '200', + options: [] }, { label: '主要事迹', columnName: 'mainDeed', @@ -249,6 +277,7 @@ export default { customerId: '', searchForm: { gridId: '', + categoryId: '', mainDeed: '', name: '' }, @@ -256,11 +285,13 @@ export default { agencyId: '', gridId: '', name: '', + categoryId: '', mainDeed: '', imageList: [] }, rules: { gridId: [{ required: true, message: '网格不能为空', trigger: 'blur' }], + categoryId: [{ required: true, message: '分类类别不能为空', trigger: 'blur' }], name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }], mainDeed: [{ required: true, message: '主要事迹不能为空', trigger: 'blur' }], } @@ -272,6 +303,8 @@ export default { this.getTableData() this.getGridList('query') this.getGridList('addorupdate') + this.getCateList('query') + this.getCateList('addorupdate') }, 200) this.pageLoading = true }, @@ -439,6 +472,7 @@ export default { this.handleSearch() }, handleAdd() { + this.dialogVisible = true }, @@ -555,6 +589,30 @@ export default { return this.$message.error('网络错误') }) }, + async getCateList(type) { + const { user } = await this.$store.state + console.log('user---ppp', user) + const params = { + customerId: this.customerId, + type + } + // addorupdate query + await this.$http + .post('/resi/partymember/stylecategorydict/select-list', params) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } else { + console.log('获取查询详情成功', res.data) + + if (type === 'query') this.optionsC = res.data + else this.optionsEditC = res.data + } + }) + .catch(() => { + return this.$message.error('网络错误') + }) + }, async getTableData() { this.tableLoading = true const { user } = await this.$store.state From c92fb9e3e175b776799abe2c9b29f44701e9bdf4 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 14 Feb 2022 14:38:18 +0800 Subject: [PATCH 07/13] dd --- .../modules/communityParty/elegant/index.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index 1bb3dfc43..e24c2a0d2 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -149,7 +149,17 @@ - + + + + + + + item.categoryId) + + if (!_arr.includes(res.data.categoryId) && !this.disabled) this.form.categoryId = '' + // this.optionsEditC.forEach(item => { + // if (item.categoryId === res.data.categoryId) + // }) this.dialogVisible = true } }) From 69d142ac26771264d7b8ea224636ceb6185e8e23 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 14 Feb 2022 15:19:10 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/communityParty/elegant/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index e24c2a0d2..e7d9257b8 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -24,14 +24,15 @@ - + + From de14683266a04f5c38174081b2ed5a4fc9b19f44 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 15 Feb 2022 09:54:50 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=B0=8F=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 82 +++++++++++++++---- .../modules/base/community/communityTable.vue | 75 +++++++++++------ .../modules/base/community/roomTable.vue | 9 +- .../visual/basicinfo/basicInfoMain.vue | 3 + 4 files changed, 126 insertions(+), 43 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index b7aae7940..3a04cd3d2 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -39,23 +39,41 @@ type="green" size="small" @click="handleAdd">新增楼宇 - 下载楼宇模板 - 下载楼宇模板 + + + :http-request="(()=>{uploadFile( 'building')})"> 导入楼宇数据 + 下载房屋模板 + + + 导入房屋数据 +
@@ -246,6 +264,7 @@ export default { this.$refs.ref_form.initForm('edit', row, this.agencyObj) }) }, + handleToNextLevel (row) { this.$emit('toNextLevel', row, 'building') }, @@ -355,11 +374,20 @@ export default { }, - handleExportModule () { + handleExportModule (type) { + let title = '' - title = '楼栋模板' + let url = "/gov/org/neighborhood/exporttemplate" + if (type === 'building') { + title = '楼宇导入模板' + url = '' + + } else if (type === 'room') { + title = '房间导入模板' + url = '' + } + - const url = "/gov/org/building/exporttemplate" let params = {} app.ajax.exportFilePost( @@ -375,8 +403,9 @@ export default { ); }, + // 上传文件之前的钩子 - beforeUpload (file) { + beforeUpload (file, type) { this.files = file; const isText = file.type === 'application/vnd.ms-excel' @@ -384,6 +413,8 @@ export default { if (!isText && !isTextComputer) { this.$message.error('请选择正确格式的文件') + this.files = null + this.fileName = '' return false } else { this.fileName = file.name; @@ -396,21 +427,35 @@ export default { this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) }, - async uploadFile () { - this.loading = true - + async uploadFile (type) { if (this.fileName == "") { - this.$message.warning('请选择要上传的文件!') + return false } + this.loading = true - //清空上传列表 - this.$refs['upload'].clearFiles() - var url = '/gov/org/building/import' + //清空上传列表 + let url = '' + let params = {} let fileFormData = new FormData(); fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 + 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' + + + } else if (type === 'room') { + this.$refs['upload_room'].clearFiles() + url = '/gov/org/ichouse/houseimport' + + } + const { data, code, msg } = await requestPost(url, fileFormData) if (code === 0) { @@ -510,6 +555,7 @@ export default { } .div_btn { + display: flex; margin-top: 20px; } diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 211b44eac..118bf4012 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -42,16 +42,16 @@ 下载小区模板 + @click="handleExportModule('community')">下载小区模板 - + :http-request="(()=>{uploadFile( 'community')})"> 导入小区数据 @@ -60,18 +60,16 @@ 下载楼宇模板 + @click="handleExportModule('building')">下载楼宇模板 + :http-request="(()=>{uploadFile( 'building')})"> 导入楼宇数据 @@ -79,18 +77,16 @@ 下载房屋模板 + @click="handleExportModule('room')">下载房屋模板 + :http-request="(()=>{uploadFile( 'room')})"> 导入房屋数据 @@ -241,9 +237,9 @@ export default { if (fromTree) { this.agencyObj = treeObj } - + // console.log(this.agencyObj) const url = "/gov/org/neighborhood/neighborhoodlist" - // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodlist" + let params = { pageSize: this.pageSize, pageNo: this.pageNo, @@ -401,11 +397,22 @@ export default { }, - handleExportModule () { + handleExportModule (type) { let title = '' - title = '小区模板' + let url = "/gov/org/neighborhood/exporttemplate" + if (type === 'community') { + title = '小区导入模板' + url = '' + + } else if (type === 'building') { + title = '楼宇导入模板' + url = '' + + } else if (type === 'room') { + title = '房间导入模板' + url = '' + } - const url = "/gov/org/neighborhood/exporttemplate" let params = {} app.ajax.exportFilePost( @@ -441,11 +448,10 @@ export default { }, // 上传文件个数超过定义的数量 handleExceed (files, fileList) { - this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) }, - async uploadFile () { + async uploadFile (type) { if (this.fileName == "") { @@ -454,13 +460,34 @@ export default { this.loading = true //清空上传列表 - this.$refs['upload'].clearFiles() - - var url = '/gov/org/neighborhood/import' + let url = '' + let params = {} let fileFormData = new FormData(); fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - const { data, code, msg } = await requestPost(url, fileFormData) + params.file = fileFormData + params.orgId = this.agencyObj.id + params.orgType = this.agencyObj.level === 'grid' ? 'grid' : 'agency' + + + if (type === 'community') { + this.$refs['upload_community'].clearFiles() + url = '/gov/org/icneighborhood/neighborhoodimport' + + + } else if (type === 'building') { + this.$refs['upload_building'].clearFiles() + url = '/gov/org/building/buildingimport' + + + } else if (type === 'room') { + this.$refs['upload_room'].clearFiles() + url = '/gov/org/ichouse/houseimport' + + } + + + const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.$message({ diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 7aacb8352..44e0be776 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -210,6 +210,7 @@ export default { if (fromTree) { this.agencyObj = treeObj } + const url = "/gov/org/house/houselist" let params = { @@ -416,10 +417,16 @@ export default { //清空上传列表 this.$refs['upload'].clearFiles() - var url = '/gov/org/house/import' + var url = '/gov/org/ichouse/houseimport' + + let params = {} let fileFormData = new FormData(); fileFormData.append('file', this.files);//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({ diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index 825a17d15..b3fcc0dc8 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -113,6 +113,7 @@ import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/int import { getCenter, boundingExtent } from 'ol/extent.js'; import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js'; +import nextTick from 'dai-js/tools/nextTick' import { mapGetters } from "vuex"; import { Loading } from 'element-ui'; //引入Loading服务 import { requestPost } from "@/js/dai/request"; @@ -257,6 +258,8 @@ const vueGis = { //初始化地图 this.initMap() + + await nextTick(300) this.addParentLayer() this.loadParentPolygon() //添加标注图层 From bf99e5c3629aae3bb3169677b560b32216e6dfc9 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 15 Feb 2022 16:48:33 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 51 +++--- .../modules/base/community/community.vue | 6 +- .../modules/base/community/communityTable.vue | 147 ++++++++++-------- .../modules/base/community/roomTable.vue | 38 +++-- .../communityGovern/distributionAnalyze.vue | 2 + .../visual/communityGovern/processAnalyze.vue | 1 + .../visual/components/screen-map/index.vue | 6 +- 7 files changed, 143 insertions(+), 108 deletions(-) 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); From c0a5adc125195151eda439b1dc1f27715e420550 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 16 Feb 2022 10:12:37 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/buildTable.vue | 15 +++++++-------- .../modules/base/community/communityTable.vue | 12 +++++++----- src/views/modules/base/community/roomTable.vue | 6 +++--- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 70d61677c..1c85aae07 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -377,10 +377,10 @@ export default { handleExportModule (type) { let title = '' - let url = "/gov/org/neighborhood/exporttemplate" + let url = "" if (type === 'building') { title = '楼宇导入模板' - url = '/gov/org/neighborhood/exporttemplate' + url = '/gov/org/building/exporttemplate' } else if (type === 'room') { title = '房屋导入模板' @@ -449,7 +449,8 @@ export default { if (type === 'building') { this.$refs['upload_building'].clearFiles() - url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport' + // url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport' + url = '/gov/org/building/buildingimport' } else if (type === 'room') { @@ -458,12 +459,10 @@ export default { url = '/gov/org/house/houseimport' } - - - + this.startLoading() window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { - + this.endLoading() if (data.code === 0 || data.code > 8000) { // this.$message({ // type: "success", @@ -477,7 +476,7 @@ export default { } }, (rspMsg, data) => { - + this.endLoading() this.$message.error(rspMsg) }, { headers: { 'Content-Type': 'multipart/form-data' } }) diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 3293431a4..e475a5c0a 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -402,18 +402,18 @@ export default { handleExportModule (type) { let title = '' - let url = "/gov/org/neighborhood/exporttemplate" + let url = "" if (type === 'community') { title = '小区导入模板' - url = '' + url = '/gov/org/neighborhood/exporttemplate' } else if (type === 'building') { title = '楼宇导入模板' - url = '' + url = '/gov/org/building/exporttemplate' } else if (type === 'room') { title = '房间导入模板' - url = '' + url = '/gov/org/house/exporttemplate' } let params = {} @@ -488,8 +488,10 @@ export default { url = '/gov/org/house/houseimport' } + this.startLoading() window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { + this.endLoading() if (data.code === 0 || data.code > 8000) { // this.$message({ // type: "success", @@ -503,7 +505,7 @@ export default { } }, (rspMsg, data) => { - + this.endLoading() this.$message.error(rspMsg) }, { headers: { 'Content-Type': 'multipart/form-data' } }) diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 41054abf2..7addb7cf9 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -424,10 +424,10 @@ export default { fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - + this.startLoading() window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { - + this.endLoading() if (data.code === 0 || data.code > 8000) { // this.$message({ // type: "success", @@ -441,7 +441,7 @@ export default { } }, (rspMsg, data) => { - + this.endLoading() this.$message.error(rspMsg) }, { headers: { 'Content-Type': 'multipart/form-data' } }) From f8ee49ca47a342ff54410cf7f824344f4f414e66 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 17 Feb 2022 14:41:53 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E5=85=B7=E5=90=8D=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 4f9c4663b..0959dc878 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -444,13 +444,13 @@ export default { const isType = file.type === 'application/vnd.ms-excel' const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' const fileType = isType || isTypeComputer - const isLt1M = (file.size / 1024 / 1024) < 10 + const isLt1M = (file.size / 1024 / 1024) < 100 if (!fileType) { this.$message.error('上传文件只能是xls/xlsx格式!') } if (!isLt1M) { - this.$message.error('上传文件大小不能超过 10MB!') + this.$message.error('上传文件大小不能超过 100MB!') } return fileType && isLt1M }, @@ -463,6 +463,7 @@ export default { url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', method: 'post', data: formData, + timeout: '300000', responseType: 'blob' }) .then((res) => { From 2062ffd1df185a2bd7b2908cc6544866c3a8fd25 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 17 Feb 2022 14:45:33 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=8A=A0=E7=BB=93=E6=9E=9C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 19 ++++++++++---- .../modules/base/community/communityTable.vue | 26 +++++++++---------- .../modules/base/community/roomTable.vue | 20 ++++++++++---- 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 1c85aae07..07c7eb0d5 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -468,12 +468,12 @@ export default { // type: "success", // message: "导入成功" // }); - this.$message.success(rspMsg) - this.$emit('refreshTree') - this.loadTable() - } else { - this.$message.error(rspMsg) + // this.$message.success(rspMsg) + + // this.$emit('refreshTree') + // this.loadTable() } + this.showMessage(rspMsg) }, (rspMsg, data) => { this.endLoading() @@ -482,6 +482,15 @@ export default { }, + showMessage (msg) { + this.$alert(msg, '操作结果', { + confirmButtonText: '关闭', + callback: action => { + this.$emit('refreshTree') + this.loadTable() + } + }); + }, handleSizeChange (val) { this.pageSize = val diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index e475a5c0a..c33c02465 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -470,9 +470,6 @@ export default { fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - - - if (type === 'community') { this.$refs['upload_community'].clearFiles() url = '/gov/org/icneighborhood/neighborhoodimport' @@ -493,16 +490,11 @@ export default { (data, rspMsg) => { this.endLoading() 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) + + + } + this.showMessage(rspMsg) }, (rspMsg, data) => { this.endLoading() @@ -510,9 +502,17 @@ export default { }, { headers: { 'Content-Type': 'multipart/form-data' } }) - }, + showMessage (msg) { + this.$alert(msg, '操作结果', { + confirmButtonText: '关闭', + callback: action => { + this.$emit('refreshTree') + this.loadTable() + } + }); + }, handleSizeChange (val) { this.pageSize = val this.pageNo = 1 diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 7addb7cf9..ac654ced1 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -433,12 +433,11 @@ export default { // type: "success", // message: "导入成功" // }); - this.$message.success(rspMsg) - this.$emit('refreshTree') - this.loadTable() - } else { - this.$message.error(rspMsg) + + // this.$emit('refreshTree') + // this.loadTable() } + this.showMessage(rspMsg) }, (rspMsg, data) => { this.endLoading() @@ -448,6 +447,17 @@ export default { }, + showMessage (msg) { + this.$alert(msg, '操作结果', { + confirmButtonText: '关闭', + callback: action => { + this.$emit('refreshTree') + this.loadTable() + + } + }); + }, + handleSizeChange (val) { this.pageSize = val this.pageNo = 1