diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index d7e4ae245..c564b76a8 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -2002,7 +2002,7 @@ export default { this.peoForm.gender = data.gender; this.peoForm.post = data.workType; this.peoForm.idCard = data.idCard; - this.peoForm.duty = data.roleList.map(item=>item.roleId); + this.peoForm.duty = data.roleList.filter(item => item.selected).map(item => item.roleId); // 已有的权限(职责) let existedDutyArr = []; data.roleList.forEach(function (sysDuty) { diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index 540d4a93e..5c7f9240a 100644 --- a/src/views/modules/home/index.vue +++ b/src/views/modules/home/index.vue @@ -226,7 +226,7 @@ import {mapGetters} from "vuex"; import nextTick from "dai-js/tools/nextTick"; import fastcall from "@/views/modules/cpts/fastcall"; import * as echarts from 'echarts'; - +import { requestPostBi } from "@/js/dai/request-bipass"; export default { components: {fastcall}, @@ -274,7 +274,9 @@ export default { activeName: 'resi', - myChart: {} + myChart: {}, + + resiCategoryData:[] } }, computed: { @@ -358,6 +360,35 @@ export default { }) }, + async getResiCategoryData() { + const url = "resident_class_statics"; + + const { data, code, msg } = await requestPostBi( + url, + { + queryParam: { + org_id: this.$store.state.user.agencyId, + }, + }, + { + // mockId: 60031937, + } + ); + + if (code === 0) { + this.znycCategory.list = data.map((item) => { + return { + name: item.label, + count: item.count, + per: item.ratio, + const: "const", + }; + }); + console.log(this.resiCategoryData); + } else { + this.$message.error(msg); + } + }, handleWindowResize() { if (this.myChart) { this.myChart.resize(); @@ -424,7 +455,8 @@ export default { async getApiData() { await this.getOrgData(); this.getWarningList(); - this.getZnycList(); + // this.getZnycList(); + this.getResiCategoryData() this.getPandectData(); this.getNoticeData(); },