Browse Source

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

shibei_master
dai 4 years ago
parent
commit
1c8e09eed6
  1. 3
      .env.production.uat
  2. 3
      public/index.html
  3. 2
      src/utils/request.js
  4. 51
      src/views/modules/base/community/buildTable.vue
  5. 57
      src/views/modules/base/community/communityTable.vue
  6. 32
      src/views/modules/base/community/roomTable.vue
  7. 70
      src/views/modules/base/resi.vue
  8. 69
      src/views/modules/communityParty/elegant/index.vue
  9. 8
      src/views/modules/visual/communityGovern/typePieOption.js

3
.env.production.uat

@ -1,4 +1,5 @@
NODE_ENV=production 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_NODE_ENV=prod:uat
VUE_APP_PUBLIC_PATH=epmet-oper VUE_APP_PUBLIC_PATH=epmet-oper

3
public/index.html

@ -57,7 +57,8 @@
<!-- 验收测试环境 aliyun --> <!-- 验收测试环境 aliyun -->
<% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %> <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %>
<script> <script>
window.SITE_CONFIG['apiURL'] = 'http://120.27.18.76/api' // window.SITE_CONFIG['apiURL'] = 'http://120.27.18.76/api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
</script> </script>
<% } %> <% } %>
<!-- 生产环境 --> <!-- 生产环境 -->

2
src/utils/request.js

@ -7,7 +7,7 @@ import isPlainObject from 'lodash/isPlainObject'
const http = axios.create({ const http = axios.create({
baseURL: window.SITE_CONFIG['apiURL'], baseURL: window.SITE_CONFIG['apiURL'],
timeout: 1000 * 180, timeout: 1000 * 900,
withCredentials: true withCredentials: true
}) })

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

@ -34,15 +34,18 @@
<el-button style="float:left" <el-button style="float:left"
type="yellow" type="yellow"
size="small" size="small"
icon="el-icon-download"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
<el-button style="float:left" <el-button style="float:left"
type="green" type="green"
size="small" size="small"
icon="el-icon-plus"
@click="handleAdd">新增楼宇</el-button> @click="handleAdd">新增楼宇</el-button>
<el-button style=";margin-left:10px" <el-button style=";margin-left:10px"
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule('building')">下载楼宇模板</el-button> @click="handleExportModule('building')">下载楼宇模板</el-button>
<el-upload style="" <el-upload style=""
@ -55,11 +58,14 @@
:http-request="(()=>{uploadFile( 'building')})"> :http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importBuildingLoading"
type="red">导入楼宇数据</el-button> type="red">导入楼宇数据</el-button>
</el-upload> </el-upload>
<el-button style=";margin-left:10px" <el-button style=";margin-left:10px"
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule('room')">下载房屋模板</el-button> @click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style="" <el-upload style=""
@ -72,6 +78,8 @@
:http-request="(()=>{uploadFile( 'room')})"> :http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button> type="red">导入房屋数据</el-button>
</el-upload> </el-upload>
</div> </div>
@ -172,7 +180,8 @@ let loading // 加载动画
export default { export default {
data () { data () {
return { return {
loading: false, importBuildingLoading: false,
importRoomLoading: false,
total: 0, total: 0,
pageSize: 20, pageSize: 20,
pageNo: 0, pageNo: 0,
@ -429,10 +438,14 @@ export default {
async uploadFile (type) { async uploadFile (type) {
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false return false
} }
this.loading = true this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
// //
@ -451,33 +464,37 @@ export default {
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' url = '/gov/org/building/buildingimport'
this.importBuildingLoading = true
} else if (type === 'room') { } else if (type === 'room') {
this.$refs['upload_room'].clearFiles() this.$refs['upload_room'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport' // url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport'
url = '/gov/org/house/houseimport' url = '/gov/org/house/houseimport'
this.importRoomLoading = true
} }
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({
// 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) => { (rspMsg, data) => {
this.endLoading() if (type === 'building') {
this.$message.error(rspMsg) this.importBuildingLoading = false
} else if (type === 'room') {
this.importRoomLoading = false
}
}, { headers: { 'Content-Type': 'multipart/form-data' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },

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

@ -34,16 +34,19 @@
<el-button style="" <el-button style=""
type="yellow" type="yellow"
size="small" size="small"
icon="el-icon-download"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
<el-button style="" <el-button style=""
type="green" type="green"
size="small" size="small"
icon="el-icon-plus"
@click="handleAdd">新增小区</el-button> @click="handleAdd">新增小区</el-button>
<div class="btn_upload" <div class="btn_upload"
v-if="agencyObj.level==='community'||agencyObj.level==='grid'"> v-if="agencyObj.level==='community'||agencyObj.level==='grid'">
<el-button style="" <el-button style=""
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule('community')">下载小区模板</el-button> @click="handleExportModule('community')">下载小区模板</el-button>
<el-upload ref="upload_community" <el-upload ref="upload_community"
@ -56,12 +59,15 @@
:http-request="(()=>{uploadFile( 'community')})"> :http-request="(()=>{uploadFile( 'community')})">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importCommunityLoading"
type="red">导入小区数据</el-button> type="red">导入小区数据</el-button>
</el-upload> </el-upload>
<el-button style=";margin-left:10px" <el-button style=";margin-left:10px"
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule('building')">下载楼宇模板</el-button> @click="handleExportModule('building')">下载楼宇模板</el-button>
<el-upload style="" <el-upload style=""
@ -74,11 +80,14 @@
:http-request="(()=>{uploadFile( 'building')})"> :http-request="(()=>{uploadFile( 'building')})">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importBuildingLoading"
type="red">导入楼宇数据</el-button> type="red">导入楼宇数据</el-button>
</el-upload> </el-upload>
<el-button style=";margin-left:10px" <el-button style=";margin-left:10px"
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule('room')">下载房屋模板</el-button> @click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style="" <el-upload style=""
@ -91,6 +100,8 @@
:http-request="(()=>{uploadFile( 'room')})"> :http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button> type="red">导入房屋数据</el-button>
</el-upload> </el-upload>
</div> </div>
@ -192,7 +203,9 @@ let loading // 加载动画
export default { export default {
data () { data () {
return { return {
loading: false, importBuildingLoading: false,
importRoomLoading: false,
importCommunityLoading: false,
total: 0, total: 0,
pageSize: 20, pageSize: 20,
pageNo: 0, pageNo: 0,
@ -457,10 +470,16 @@ export default {
async uploadFile (type) { async uploadFile (type) {
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false return false
} }
this.loading = true
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
// //
let url = '' let url = ''
@ -471,6 +490,7 @@ export default {
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip
if (type === 'community') { if (type === 'community') {
this.importCommunityLoading = true
this.$refs['upload_community'].clearFiles() this.$refs['upload_community'].clearFiles()
url = '/gov/org/icneighborhood/neighborhoodimport' url = '/gov/org/icneighborhood/neighborhoodimport'
@ -478,27 +498,44 @@ export default {
} else if (type === 'building') { } else if (type === 'building') {
this.$refs['upload_building'].clearFiles() this.$refs['upload_building'].clearFiles()
url = '/gov/org/building/buildingimport' url = '/gov/org/building/buildingimport'
this.importBuildingLoading = true
} else if (type === 'room') { } else if (type === 'room') {
this.$refs['upload_room'].clearFiles() this.$refs['upload_room'].clearFiles()
url = '/gov/org/house/houseimport' url = '/gov/org/house/houseimport'
this.importRoomLoading = true
} }
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.$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) => { (rspMsg, data) => {
this.endLoading() if (type === 'community') {
this.$message.error(rspMsg) 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' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })

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

@ -34,14 +34,17 @@
<el-button style="float:left" <el-button style="float:left"
type="yellow" type="yellow"
size="small" size="small"
icon="el-icon-download"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
<el-button style="float:left" <el-button style="float:left"
type="green" type="green"
icon="el-icon-plus"
size="small" size="small"
@click="handleAdd">新增房屋</el-button> @click="handleAdd">新增房屋</el-button>
<el-button style="float:left" <el-button style="float:left"
type="blue" type="blue"
size="small" size="small"
icon="el-icon-download"
@click="handleExportModule">下载房屋模板</el-button> @click="handleExportModule">下载房屋模板</el-button>
<el-upload ref="upload" <el-upload ref="upload"
:multiple='false' :multiple='false'
@ -54,6 +57,8 @@
:http-request="uploadFile"> :http-request="uploadFile">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
icon="el-icon-upload2"
:loading="importRoomLoading"
type="red">导入房屋数据</el-button> type="red">导入房屋数据</el-button>
</el-upload> </el-upload>
</div> </div>
@ -165,7 +170,7 @@ let loading // 加载动画
export default { export default {
data () { data () {
return { return {
loading: false, importRoomLoading: false,
total: 0, total: 0,
pageSize: 20, pageSize: 20,
pageNo: 0, pageNo: 0,
@ -407,13 +412,19 @@ export default {
}, },
async uploadFile () { async uploadFile () {
this.loading = true
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!') this.$message.warning('请选择要上传的文件!')
return false return false
} }
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
// //
this.$refs['upload'].clearFiles() this.$refs['upload'].clearFiles()
@ -424,24 +435,19 @@ 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() this.importRoomLoading = true
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({
// type: "success",
// message: ""
// });
// this.$emit('refreshTree')
// this.loadTable()
} }
this.showMessage(rspMsg) this.$emit('refreshTree')
this.loadTable()
this.importRoomLoading = false
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.endLoading() this.importRoomLoading = false
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } }) }, { headers: { 'Content-Type': 'multipart/form-data' } })

70
src/views/modules/base/resi.vue

@ -457,38 +457,56 @@ export default {
async uploadHttpRequest (file) { async uploadHttpRequest (file) {
this.importLoading = true this.importLoading = true
this.importBtnTitle = '正在上传中...' this.importBtnTitle = '正在上传中...'
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
const formData = new FormData() //FormDataappend('key', value) const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) // formData.append('file', file.file) //
await axios({ await this.$http
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel', .post('/epmetuser/icresiuser/importExcel', formData).then(res => {
method: 'post', console.log('res-up', res)
data: formData, if (res.data.code == 0 && res.data.msg == 'success') {
timeout: '900000', this.$message.success('导入成功')
responseType: 'blob' this.getTableData()
}) } else this.$message.error(res.data.msg)
.then((res) => { }).catch(err => {
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) console.log('失败', err)
file.onError() // file.onError() //
this.$message.error('导入失败') 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.importLoading = false
this.importBtnTitle = '导入人员数据' this.importBtnTitle = '导入人员数据'
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()

69
src/views/modules/communityParty/elegant/index.vue

@ -374,36 +374,55 @@ export default {
async uploadHttpRequest(file) { async uploadHttpRequest(file) {
this.importLoading = true this.importLoading = true
this.importBtnTitle = '正在上传中...' this.importBtnTitle = '正在上传中...'
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
const formData = new FormData() //FormDataappend('key', value) const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) // formData.append('file', file.file) //
await axios({ this.$http
url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/import', .post('/resi/partymember/icpartymemberstyle/import', formData).then(res => {
method: 'post', console.log('res-up', res)
data: formData, if (res.data.code == 0 && res.data.msg == 'success') {
responseType: 'blob' this.$message.success('导入成功')
}) this.getTableData()
.then((res) => { } else {
// this.importLoading = false this.$message.error(res.data.msg)
// this.importBtnTitle = '' }
// let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) }).catch(err => {
// 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) console.log('失败', err)
file.onError() // file.onError() //
this.$message.error('导入失败') 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.importLoading = false
this.importBtnTitle = '导入人员数据' this.importBtnTitle = '导入人员数据'
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()

8
src/views/modules/visual/communityGovern/typePieOption.js

@ -77,7 +77,7 @@ const center= ['50%', '250px']
// height: '80%', // height: '80%',
selectedMode: 'single', selectedMode: 'single',
left: 'center', left: 'center',
width: 400, width: 480,
label: { label: {
// show: false, // show: false,
position: 'outside', position: 'outside',
@ -88,14 +88,14 @@ const center= ['50%', '250px']
edgeDistance: 1, edgeDistance: 1,
lineHeight: 15, lineHeight: 15,
color: '#fff', color: '#fff',
fontSize: 12, fontSize: 10,
// distanceToLabelLine: -60, // distanceToLabelLine: -60,
rich: { rich: {
name: { name: {
padding: [0, 6, 0, 6] padding: [0, 6, 0, 6]
}, },
a: { a: {
fontSize: 30, fontSize: 25,
color: '#fff', color: '#fff',
padding: [0, 6, 6, 6] padding: [0, 6, 6, 6]
}, },
@ -111,7 +111,7 @@ const center= ['50%', '250px']
labelLine: { labelLine: {
show: false, show: false,
smooth: 0.2, smooth: 0.2,
length: 30, length: 50,
length2: 0, length2: 0,
maxSurfaceAngle: 80 maxSurfaceAngle: 80
}, },

Loading…
Cancel
Save