Browse Source

数据看板地图上方饼图页面与饼图下钻列表加agencyId跟level

v1.1
mk 2 years ago
parent
commit
e07a05b611
  1. 3
      src/views/dataBoard/renfang/resi/classNew.vue
  2. 26
      src/views/dataBoard/renfang/visualizing/components/dangyuan.vue
  3. 57
      src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue
  4. 2
      src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue
  5. 26
      src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue

3
src/views/dataBoard/renfang/resi/classNew.vue

@ -908,6 +908,7 @@ export default {
}, },
created() { created() {
this.pageNo = 1; this.pageNo = 1;
this.level = this.$store.state.user.level === 'grid'?'grid':'agency'
}, },
watch: { watch: {
// oldValsss: { // oldValsss: {
@ -1017,6 +1018,8 @@ export default {
let queryParam = { let queryParam = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
agencyId: this.org_id,
level: this.level,
...this.searchParams, ...this.searchParams,
...params, ...params,
}; };

26
src/views/dataBoard/renfang/visualizing/components/dangyuan.vue

@ -66,34 +66,32 @@ export default {
methods: { methods: {
getData() { getData() {
const { user } = this.$store.state const { user } = this.$store.state
var level = user.level; var level = user.level;
if(level==='grid'){ if(level==='grid'){
level = "grid" level = "grid"
}else{ }else{
level = "agency" level = "agency"
} }
let params = this.$paramsFormat({
this.$http agencyId: this.org_id,
.get("/actual/base/peopleRoomOverview/partyPie?type=0") level
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dyLeft = dataFormatter(res.data);
this.initLeftCharts();
}) })
.catch(() => {}); const partyTypes = [0, 1];
partyTypes.forEach(type => {
this.$http this.$http
.get("/actual/base/peopleRoomOverview/partyPie?type=1") .get(`/actual/base/peopleRoomOverview/partyPie?type=${type}&${params}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.dyRight = dataFormatter(res.data); // 使 type
this.initRightCharts(); this[`dy${type === 0 ? 'Left' : 'Right'}`] = dataFormatter(res.data);
this[`init${type === 0 ? 'Left' : 'Right'}Charts`]();
}) })
.catch(() => {}); .catch(() => {});
});
this.$http this.$http
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'PARTY_FLAG'}) .post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'PARTY_FLAG'})

57
src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue

@ -93,57 +93,28 @@ export default {
if(level!="grid"){ if(level!="grid"){
level = "agency" level = "agency"
} }
let params = this.$paramsFormat({
this.$http agencyId: this.org_id,
.get("/actual/base/peopleRoomOverview/unemployedPie?type=0") level
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData1 = dataFormatter(res.data);
this.syryDataCharts1();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=1")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData2 = dataFormatter(res.data);
this.syryDataCharts2();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=2")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData3 = dataFormatter(res.data);
this.syryDataCharts3();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=3")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData4 = dataFormatter(res.data);
this.syryDataCharts4();
}) })
.catch(() => {}); //
const types = [0, 1, 2, 3, 4];
types.forEach(type => {
this.$http this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=4") .get(`/actual/base/peopleRoomOverview/unemployedPie?type=${type}&${params}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.syryData5 = dataFormatter(res.data);
this.syryDataCharts5(); // 使 type
this[`syryData${type+1}`] = dataFormatter(res.data);
this[`syryDataCharts${type+1}`]();
}) })
.catch(() => {}); .catch(() => {});
});
this.$http this.$http
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'UNEMPLOYED_FLAG'}) .post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'UNEMPLOYED_FLAG'})

2
src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue

@ -79,7 +79,7 @@ export default {
.catch(() => {}); .catch(() => {});
this.$http this.$http
.post("/actual/base/peopleRoomOverview/getSpecialResidentAnalyze",{org_id:this.org_id}) .post("/actual/base/peopleRoomOverview/getSpecialResidentAnalyze",{org_id:this.org_id,level:level})
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);

26
src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue

@ -73,27 +73,27 @@ export default {
}else{ }else{
level = "agency" level = "agency"
} }
//
this.$http const volunteerTypes = [0, 1];
.get("/actual/base/peopleRoomOverview/volunteerPie?type=0") let params = this.$paramsFormat({
.then(({ data: res }) => { agencyId: this.org_id,
if (res.code !== 0) { level
return this.$message.error(res.msg);
}
this.zyzLeft = dataFormatter(res.data);
this.initLeftCharts();
}) })
.catch(() => {}); //
volunteerTypes.forEach(type => {
this.$http this.$http
.get("/actual/base/peopleRoomOverview/volunteerPie?type=1") .get(`/actual/base/peopleRoomOverview/volunteerPie?type=${type}&${params}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.zyzRight = dataFormatter(res.data);
this.initRightCharts(); // 使 type
this[`zyz${type === 0 ? 'Left' : 'Right'}`] = dataFormatter(res.data);
this[`init${type === 0 ? 'Left' : 'Right'}Charts`]();
}) })
.catch(() => {}); .catch(() => {});
});
this.$http this.$http
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'VOLUNTEER_FLAG'}) .post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'VOLUNTEER_FLAG'})

Loading…
Cancel
Save