From 5da691802ab17e99cb9b9ca68124dd5ba7f839b7 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 25 Feb 2022 15:00:01 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- src/views/modules/base/resi.vue | 70 ++++++++++++------- .../modules/communityParty/elegant/index.vue | 69 +++++++++++------- 3 files changed, 89 insertions(+), 52 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 419f83ec..4dea91da 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,7 +7,7 @@ import isPlainObject from 'lodash/isPlainObject' const http = axios.create({ baseURL: window.SITE_CONFIG['apiURL'], - timeout: 1000 * 180, + timeout: 1000 * 300, withCredentials: true }) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 0959dc87..86c4e35f 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -457,38 +457,56 @@ export default { async uploadHttpRequest (file) { this.importLoading = true this.importBtnTitle = '正在上传中...' + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) const formData = new FormData() //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append('file', file.file) //添加文件对象 - await axios({ - url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', - method: 'post', - data: formData, - timeout: '300000', - responseType: 'blob' - }) - .then((res) => { - if (res.headers["content-disposition"]) { - let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) - console.log('filename', fileName) - let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) - var url = window.URL.createObjectURL(blob) - var aLink = document.createElement('a') - aLink.style.display = 'none' - aLink.href = url - aLink.setAttribute('download', fileName) - document.body.appendChild(aLink) - aLink.click() - document.body.removeChild(aLink) //下载完成移除元素 - window.URL.revokeObjectURL(url) //释放掉blob对象 - } - - this.getTableData() - }) - .catch(err => { + await this.$http + .post('/epmetuser/icresiuser/importExcel', formData).then(res => { + console.log('res-up', res) + if (res.data.code == 0 && res.data.msg == 'success') { + this.$message.success('导入成功') + this.getTableData() + } else this.$message.error(res.data.msg) + }).catch(err => { console.log('失败', err) file.onError() //上传失败的文件会从文件列表中删除 this.$message.error('导入失败') }) + // await axios({ + // url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', + // method: 'post', + // data: formData, + // timeout: '300000', + // responseType: 'blob' + // }) + // .then((res) => { + // console.log('res-up', res) + // // if (res.headers["content-disposition"]) { + // // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) + // // console.log('filename', fileName) + // // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) + // // var url = window.URL.createObjectURL(blob) + // // var aLink = document.createElement('a') + // // aLink.style.display = 'none' + // // aLink.href = url + // // aLink.setAttribute('download', fileName) + // // document.body.appendChild(aLink) + // // aLink.click() + // // document.body.removeChild(aLink) //下载完成移除元素 + // // window.URL.revokeObjectURL(url) //释放掉blob对象 + // // } + + // this.getTableData() + // }) + // .catch(err => { + // console.log('失败', err) + // file.onError() //上传失败的文件会从文件列表中删除 + // this.$message.error('导入失败') + // }) this.importLoading = false this.importBtnTitle = '导入人员数据' this.$refs.upload.clearFiles() diff --git a/src/views/modules/communityParty/elegant/index.vue b/src/views/modules/communityParty/elegant/index.vue index e7d9257b..592cbeb1 100644 --- a/src/views/modules/communityParty/elegant/index.vue +++ b/src/views/modules/communityParty/elegant/index.vue @@ -374,36 +374,55 @@ export default { async uploadHttpRequest(file) { this.importLoading = true this.importBtnTitle = '正在上传中...' + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) const formData = new FormData() //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append('file', file.file) //添加文件对象 - await axios({ - url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/import', - method: 'post', - data: formData, - responseType: 'blob' - }) - .then((res) => { - // this.importLoading = false - // this.importBtnTitle = '导入人员数据' - // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) - // console.log('filename', fileName) - // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) - // var url = window.URL.createObjectURL(blob) - // var aLink = document.createElement('a') - // aLink.style.display = 'none' - // aLink.href = url - // aLink.setAttribute('download', fileName) - // document.body.appendChild(aLink) - // aLink.click() - // document.body.removeChild(aLink) //下载完成移除元素 - // window.URL.revokeObjectURL(url) //释放掉blob对象 - this.getTableData() - }) - .catch( err => { + this.$http + .post('/resi/partymember/icpartymemberstyle/import', formData).then(res => { + console.log('res-up', res) + if (res.data.code == 0 && res.data.msg == 'success') { + this.$message.success('导入成功') + this.getTableData() + } else { + this.$message.error(res.data.msg) + } + }).catch(err => { console.log('失败', err) file.onError() //上传失败的文件会从文件列表中删除 this.$message.error('导入失败') - }) + }) + // await axios({ + // url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/import', + // method: 'post', + // data: formData, + // responseType: 'blob' + // }) + // .then((res) => { + // // this.importLoading = false + // // this.importBtnTitle = '导入人员数据' + // // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) + // // console.log('filename', fileName) + // // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) + // // var url = window.URL.createObjectURL(blob) + // // var aLink = document.createElement('a') + // // aLink.style.display = 'none' + // // aLink.href = url + // // aLink.setAttribute('download', fileName) + // // document.body.appendChild(aLink) + // // aLink.click() + // // document.body.removeChild(aLink) //下载完成移除元素 + // // window.URL.revokeObjectURL(url) //释放掉blob对象 + // this.getTableData() + // }) + // .catch( err => { + // console.log('失败', err) + // file.onError() //上传失败的文件会从文件列表中删除 + // this.$message.error('导入失败') + // }) this.importLoading = false this.importBtnTitle = '导入人员数据' this.$refs.upload.clearFiles() From 3b6889da2a74929eaf965887af5f4d34d2a43ab4 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 25 Feb 2022 15:03:20 +0800 Subject: [PATCH 2/6] dd --- src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request.js b/src/utils/request.js index ccce3d8b..c03d1ae4 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,7 +7,7 @@ import isPlainObject from 'lodash/isPlainObject' const http = axios.create({ baseURL: window.SITE_CONFIG['apiURL'], - timeout: 1000 * 300, + timeout: 1000 * 900, withCredentials: true }) From ecc481d2680bab9b9501eb71fb79365880e41376 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 25 Feb 2022 15:29:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildTable.vue | 51 +++++++++++------ .../modules/base/community/communityTable.vue | 57 +++++++++++++++---- .../modules/base/community/roomTable.vue | 32 ++++++----- 3 files changed, 100 insertions(+), 40 deletions(-) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 07c7eb0d..bc1bbb95 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -34,15 +34,18 @@ 导出 新增楼宇 下载楼宇模板 导入楼宇数据 下载房屋模板 导入房屋数据 @@ -172,7 +180,8 @@ let loading // 加载动画 export default { data () { return { - loading: false, + importBuildingLoading: false, + importRoomLoading: false, total: 0, pageSize: 20, pageNo: 0, @@ -429,10 +438,14 @@ export default { async uploadFile (type) { if (this.fileName == "") { - + this.$message.warning('请选择要上传的文件!') return false } - this.loading = true + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) //清空上传列表 @@ -451,33 +464,37 @@ export default { this.$refs['upload_building'].clearFiles() // url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport' url = '/gov/org/building/buildingimport' - + this.importBuildingLoading = true } else if (type === 'room') { this.$refs['upload_room'].clearFiles() // url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport' url = '/gov/org/house/houseimport' - + this.importRoomLoading = true } - this.startLoading() + window.app.ajax.post2(url, fileFormData, (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() } - this.showMessage(rspMsg) + this.$emit('refreshTree') + this.loadTable() + if (type === 'building') { + this.importBuildingLoading = false + + } else if (type === 'room') { + this.importRoomLoading = false + } }, (rspMsg, data) => { - this.endLoading() - this.$message.error(rspMsg) + if (type === 'building') { + this.importBuildingLoading = false + + } else if (type === 'room') { + this.importRoomLoading = false + } }, { 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 c33c0246..04007c1e 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -34,16 +34,19 @@ 导出 新增小区
下载小区模板 导入小区数据 下载楼宇模板 导入楼宇数据 下载房屋模板 导入房屋数据
@@ -192,7 +203,9 @@ let loading // 加载动画 export default { data () { return { - loading: false, + importBuildingLoading: false, + importRoomLoading: false, + importCommunityLoading: false, total: 0, pageSize: 20, pageNo: 0, @@ -457,10 +470,16 @@ export default { async uploadFile (type) { if (this.fileName == "") { - + this.$message.warning('请选择要上传的文件!') return false } - this.loading = true + + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) + //清空上传列表 let url = '' @@ -471,6 +490,7 @@ export default { fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 if (type === 'community') { + this.importCommunityLoading = true this.$refs['upload_community'].clearFiles() url = '/gov/org/icneighborhood/neighborhoodimport' @@ -478,27 +498,44 @@ export default { } else if (type === 'building') { this.$refs['upload_building'].clearFiles() url = '/gov/org/building/buildingimport' - + this.importBuildingLoading = true } else if (type === 'room') { this.$refs['upload_room'].clearFiles() url = '/gov/org/house/houseimport' - + this.importRoomLoading = true } - this.startLoading() + window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { - this.endLoading() + if (data.code === 0 || data.code > 8000) { + } + this.$emit('refreshTree') + this.loadTable() + // this.showMessage(rspMsg) + if (type === 'community') { + this.importCommunityLoading = false + } else if (type === 'building') { + this.importBuildingLoading = false + } else if (type === 'room') { + this.importRoomLoading = false } - this.showMessage(rspMsg) }, (rspMsg, data) => { - this.endLoading() - this.$message.error(rspMsg) + if (type === 'community') { + this.importCommunityLoading = false + + } else if (type === 'building') { + this.importBuildingLoading = false + + } else if (type === 'room') { + this.importRoomLoading = false + } + // 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 ac654ced..21bd0f91 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -34,14 +34,17 @@ 导出 新增房屋 下载房屋模板 导入房屋数据 @@ -165,7 +170,7 @@ let loading // 加载动画 export default { data () { return { - loading: false, + importRoomLoading: false, total: 0, pageSize: 20, pageNo: 0, @@ -407,13 +412,19 @@ export default { }, async uploadFile () { - this.loading = true + if (this.fileName == "") { this.$message.warning('请选择要上传的文件!') return false } + this.$message({ + showClose: true, + message: '导入中,请到系统管理-导入记录中查看进度', + duration: 0 + }) + //清空上传列表 this.$refs['upload'].clearFiles() @@ -424,24 +435,19 @@ export default { fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - this.startLoading() + this.importRoomLoading = true window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { - this.endLoading() + if (data.code === 0 || data.code > 8000) { - // this.$message({ - // type: "success", - // message: "导入成功" - // }); - // this.$emit('refreshTree') - // this.loadTable() } - this.showMessage(rspMsg) + this.$emit('refreshTree') + this.loadTable() + this.importRoomLoading = false }, (rspMsg, data) => { - this.endLoading() - this.$message.error(rspMsg) + this.importRoomLoading = false }, { headers: { 'Content-Type': 'multipart/form-data' } }) From fd5da005d036485d0d3c9e8fde3b89b8e046266c Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 28 Feb 2022 09:28:10 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=A5=BC=E7=8A=B6=E5=9B=BE=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E7=BA=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/visual/communityGovern/typePieOption.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/modules/visual/communityGovern/typePieOption.js b/src/views/modules/visual/communityGovern/typePieOption.js index 64b6ad98..49c86b9e 100644 --- a/src/views/modules/visual/communityGovern/typePieOption.js +++ b/src/views/modules/visual/communityGovern/typePieOption.js @@ -77,7 +77,7 @@ const center= ['50%', '250px'] // height: '80%', selectedMode: 'single', left: 'center', - width: 400, + width: 480, label: { // show: false, position: 'outside', @@ -88,14 +88,14 @@ const center= ['50%', '250px'] edgeDistance: 1, lineHeight: 15, color: '#fff', - fontSize: 12, + fontSize: 10, // distanceToLabelLine: -60, rich: { name: { padding: [0, 6, 0, 6] }, a: { - fontSize: 30, + fontSize: 25, color: '#fff', padding: [0, 6, 6, 6] }, @@ -111,7 +111,7 @@ const center= ['50%', '250px'] labelLine: { show: false, smooth: 0.2, - length: 30, + length: 50, length2: 0, maxSurfaceAngle: 80 }, From 327acb62a69f3e1ea4a6073151b6b1a543773002 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 28 Feb 2022 13:31:43 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E6=9B=B4=E6=94=B9:=E5=B9=B3=E9=98=B4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E2=80=94=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index a1ac2eb1..6b33435e 100644 --- a/public/index.html +++ b/public/index.html @@ -57,7 +57,8 @@ <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %> <% } %> From 29a4ddd55ad9c14b005f300125ad35105e28a425 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Mon, 28 Feb 2022 13:45:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production.uat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.production.uat b/.env.production.uat index 0e4ab2af..83e93d4d 100644 --- a/.env.production.uat +++ b/.env.production.uat @@ -1,4 +1,5 @@ NODE_ENV=production -VUE_APP_API_SERVER = http://120.27.18.76/api +# VUE_APP_API_SERVER = http://120.27.18.76/api +VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api VUE_APP_NODE_ENV=prod:uat VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file