|
|
@ -27,6 +27,8 @@ |
|
|
|
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; |
|
|
|
import * as echarts from "echarts"; |
|
|
|
import {color, legend,title,series} from './pie_config.js' |
|
|
|
import { requestPost } from '@/js/dai/request'; |
|
|
|
|
|
|
|
function dataFormatter(arr) { |
|
|
|
return arr.map((item) => { |
|
|
|
return { |
|
|
@ -64,6 +66,8 @@ export default { |
|
|
|
activated() {}, |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
const { user } = this.$store.state |
|
|
|
console.log(user); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/oldPeopleAgePie") |
|
|
|
.then(({ data: res }) => { |
|
|
@ -85,15 +89,22 @@ export default { |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/findPeoplePie/OLD_PEOPLE_FLAG") |
|
|
|
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:user.level,category:'OLD_PEOPLE_FLAG'}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
console.log(res.data,'kankan'); |
|
|
|
this.lnrService = dataFormatter(res.data); |
|
|
|
this.initLnrServiceCharts(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
let url = '/actual/base/peopleRoomOverview/findPeoplePie' |
|
|
|
let params = { |
|
|
|
agencyId:user.agencyId, |
|
|
|
level:user.level, |
|
|
|
category:'OLD_PEOPLE_FLAG' |
|
|
|
} |
|
|
|
}, |
|
|
|
initLeftCharts() { |
|
|
|
let div = document.getElementById("lnrLeftChart"); |
|
|
|