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

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

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

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

@ -68,7 +68,7 @@ export default {
}
this.$http
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{ agencyId:user.agencyId,level:level,category:'SPECIAL_CROWD_FLAG'})
.post(`/actual/base/peopleRoomOverview/findPeoplePie`,{agencyId:user.agencyId,level:level,category:'SPECIAL_CROWD_FLAG'})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -79,7 +79,7 @@ export default {
.catch(() => {});
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 }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

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

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

Loading…
Cancel
Save