|
@ -116,7 +116,9 @@ |
|
|
<div class="echarts-container"> |
|
|
<div class="echarts-container"> |
|
|
<div id="echartsBox" class="echarts-boxs"></div> |
|
|
<div id="echartsBox" class="echarts-boxs"></div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="ecahrts-button"> |
|
|
|
|
|
<el-button type="warning" size="small" @click="handleExport">导出</el-button> |
|
|
|
|
|
</div> |
|
|
<div class="warning-box-bottom"> |
|
|
<div class="warning-box-bottom"> |
|
|
<screen-table |
|
|
<screen-table |
|
|
:headerList="headerList" |
|
|
:headerList="headerList" |
|
@ -153,6 +155,7 @@ import screenTable from "../components/screen-table/index"; |
|
|
import cptCard from "@/views/modules/visual/cpts/card"; |
|
|
import cptCard from "@/views/modules/visual/cpts/card"; |
|
|
import nextTick from "dai-js/tools/nextTick"; |
|
|
import nextTick from "dai-js/tools/nextTick"; |
|
|
import dialogInfo from './dialogInfo' |
|
|
import dialogInfo from './dialogInfo' |
|
|
|
|
|
import axios from 'axios' |
|
|
|
|
|
|
|
|
import * as echarts from 'echarts'; |
|
|
import * as echarts from 'echarts'; |
|
|
export default { |
|
|
export default { |
|
@ -179,7 +182,8 @@ export default { |
|
|
{ title: "服务方", coulmn: 'serviceName' }, |
|
|
{ title: "服务方", coulmn: 'serviceName' }, |
|
|
{ title: "服务时间", coulmn: 'wantServiceTime' }, |
|
|
{ title: "服务时间", coulmn: 'wantServiceTime' }, |
|
|
], |
|
|
], |
|
|
categoryList: {}, |
|
|
categoryList: [], |
|
|
|
|
|
categoryCode: '', |
|
|
timeRange: '', |
|
|
timeRange: '', |
|
|
tableData: [ |
|
|
tableData: [ |
|
|
// [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], |
|
|
// [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], |
|
@ -336,7 +340,8 @@ export default { |
|
|
console.log('yData', yData) |
|
|
console.log('yData', yData) |
|
|
|
|
|
|
|
|
this.initCharts(xData, yData) |
|
|
this.initCharts(xData, yData) |
|
|
this.getServiceList(orgId, orgType, data.categoryList[0].categoryCode) |
|
|
this.categoryCode = categoryList[0].categoryCode |
|
|
|
|
|
this.getServiceList(orgId, orgType, categoryList[0].categoryCode) |
|
|
} else { |
|
|
} else { |
|
|
} |
|
|
} |
|
|
this.visibleLoading = false; |
|
|
this.visibleLoading = false; |
|
@ -414,6 +419,44 @@ export default { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleExport() { |
|
|
|
|
|
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') |
|
|
|
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
|
|
|
let params = { |
|
|
|
|
|
orgId: _arr[0], |
|
|
|
|
|
orgType: orgType, |
|
|
|
|
|
categoryCode: this.categoryCode, |
|
|
|
|
|
startDateId: this.timeRange && this.timeRange[0] || '', |
|
|
|
|
|
endDateId: this.timeRange && this.timeRange[1] || '' |
|
|
|
|
|
} |
|
|
|
|
|
// .post('epmetuser/icresiuser/exportExcel', params) |
|
|
|
|
|
axios({ |
|
|
|
|
|
url: window.SITE_CONFIG['apiURL'] + '/heart/userdemand/analysis-export', |
|
|
|
|
|
// url: 'epmetuser/icresiuser/exportExcel', |
|
|
|
|
|
method: 'post', |
|
|
|
|
|
data: params, |
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('resllll', res) |
|
|
|
|
|
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对象 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
console.log('获取导出情失败', err) |
|
|
|
|
|
return this.$message.error('网络错误') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
getTreeData(data){ |
|
|
getTreeData(data){ |
|
|
if (!Array.isArray(data)) return [] |
|
|
if (!Array.isArray(data)) return [] |
|
|
let arr = data.map(item => { |
|
|
let arr = data.map(item => { |
|
@ -468,8 +511,10 @@ export default { |
|
|
if (item.categoryName == params.name) code = item.categoryCode |
|
|
if (item.categoryName == params.name) code = item.categoryCode |
|
|
}) |
|
|
}) |
|
|
if (code) { |
|
|
if (code) { |
|
|
|
|
|
this.categoryCode = code |
|
|
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') |
|
|
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') |
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
|
|
|
this.pageNo = 1 |
|
|
this.getServiceList(_arr[0], orgType, code) |
|
|
this.getServiceList(_arr[0], orgType, code) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -492,11 +537,15 @@ export default { |
|
|
pageSizeChangeHandleNew(val) { |
|
|
pageSizeChangeHandleNew(val) { |
|
|
this.pageNo = 1; |
|
|
this.pageNo = 1; |
|
|
this.pageSize = val; |
|
|
this.pageSize = val; |
|
|
this.handleCascader(this.selectAgency) |
|
|
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') |
|
|
|
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
|
|
|
this.getServiceList(_arr[0], orgType, this.categoryCode) |
|
|
}, |
|
|
}, |
|
|
pageCurrentChangeHandleNew(val) { |
|
|
pageCurrentChangeHandleNew(val) { |
|
|
this.pageNo = val; |
|
|
this.pageNo = val; |
|
|
this.handleCascader(this.selectAgency) |
|
|
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') |
|
|
|
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
|
|
|
this.getServiceList(_arr[0], orgType, this.categoryCode) |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
@ -508,6 +557,9 @@ export default { |
|
|
scoped |
|
|
scoped |
|
|
></style> |
|
|
></style> |
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
.warning-box-bottom { |
|
|
|
|
|
margin-top: 10px; |
|
|
|
|
|
} |
|
|
.card-title { |
|
|
.card-title { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
@ -723,5 +775,14 @@ export default { |
|
|
height: 400px; |
|
|
height: 400px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.ecahrts-button { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
text-align: right; |
|
|
|
|
|
::v-deep .el-button--warning { |
|
|
|
|
|
|
|
|
|
|
|
background: linear-gradient(90deg, #0863EA, #3B9FFC); |
|
|
|
|
|
border: 0; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|