|
@ -93,57 +93,28 @@ export default { |
|
|
if(level!="grid"){ |
|
|
if(level!="grid"){ |
|
|
level = "agency" |
|
|
level = "agency" |
|
|
} |
|
|
} |
|
|
|
|
|
let params = this.$paramsFormat({ |
|
|
|
|
|
agencyId: this.org_id, |
|
|
|
|
|
level |
|
|
|
|
|
}) |
|
|
|
|
|
// 定义请求类型数组 |
|
|
|
|
|
const types = [0, 1, 2, 3, 4]; |
|
|
|
|
|
|
|
|
|
|
|
types.forEach(type => { |
|
|
|
|
|
this.$http |
|
|
|
|
|
.get(`/actual/base/peopleRoomOverview/unemployedPie?type=${type}&${params}`) |
|
|
|
|
|
.then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 使用 type 动态设置对应的数据属性和方法 |
|
|
|
|
|
this[`syryData${type+1}`] = dataFormatter(res.data); |
|
|
|
|
|
this[`syryDataCharts${type+1}`](); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => {}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
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(); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => {}); |
|
|
|
|
|
this.$http |
|
|
|
|
|
.get("/actual/base/peopleRoomOverview/unemployedPie?type=4") |
|
|
|
|
|
.then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
this.syryData5 = dataFormatter(res.data); |
|
|
|
|
|
this.syryDataCharts5(); |
|
|
|
|
|
}) |
|
|
|
|
|
.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'}) |
|
|