Browse Source

小区管理导入联调

shibei_master
jiangyy 4 years ago
parent
commit
c0a5adc125
  1. 15
      src/views/modules/base/community/buildTable.vue
  2. 12
      src/views/modules/base/community/communityTable.vue
  3. 6
      src/views/modules/base/community/roomTable.vue

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

@ -377,10 +377,10 @@ 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 = '/gov/org/neighborhood/exporttemplate' url = '/gov/org/building/exporttemplate'
} else if (type === 'room') { } else if (type === 'room') {
title = '房屋导入模板' title = '房屋导入模板'
@ -449,7 +449,8 @@ export default {
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 = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport'
url = '/gov/org/building/buildingimport'
} else if (type === 'room') { } else if (type === 'room') {
@ -458,12 +459,10 @@ export default {
url = '/gov/org/house/houseimport' url = '/gov/org/house/houseimport'
} }
this.startLoading()
window.app.ajax.post2(url, fileFormData, window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => { (data, rspMsg) => {
this.endLoading()
if (data.code === 0 || data.code > 8000) { if (data.code === 0 || data.code > 8000) {
// this.$message({ // this.$message({
// type: "success", // type: "success",
@ -477,7 +476,7 @@ export default {
} }
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg) this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })

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

@ -402,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 = {}
@ -488,8 +488,10 @@ export default {
url = '/gov/org/house/houseimport' url = '/gov/org/house/houseimport'
} }
this.startLoading()
window.app.ajax.post2(url, fileFormData, window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => { (data, rspMsg) => {
this.endLoading()
if (data.code === 0 || data.code > 8000) { if (data.code === 0 || data.code > 8000) {
// this.$message({ // this.$message({
// type: "success", // type: "success",
@ -503,7 +505,7 @@ export default {
} }
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg) this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })

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

@ -424,10 +424,10 @@ export default {
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
this.startLoading()
window.app.ajax.post2(url, fileFormData, window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => { (data, rspMsg) => {
this.endLoading()
if (data.code === 0 || data.code > 8000) { if (data.code === 0 || data.code > 8000) {
// this.$message({ // this.$message({
// type: "success", // type: "success",
@ -441,7 +441,7 @@ export default {
} }
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg) this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })

Loading…
Cancel
Save