Browse Source

四大

V1.0
tianq 3 years ago
parent
commit
491ff87c1c
  1. 221
      src/views/dataBoard/sida/cpts/fwqd.vue
  2. 42
      src/views/dataBoard/sida/cpts/sqpj.vue
  3. 466
      src/views/dataBoard/sida/cpts/wtqd.vue
  4. 463
      src/views/dataBoard/sida/cpts/xqqd.vue
  5. 468
      src/views/dataBoard/sida/cpts/zyqd.vue
  6. 710
      src/views/dataBoard/sida/index.vue

221
src/views/dataBoard/sida/cpts/fwqd.vue

@ -95,20 +95,26 @@ export default {
this.getPie();
},
handleClickItem(item) {
const { type, name } = item;
this.$router.push({
path: '/dataBoard/renfang/resi-analyze',
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name
}
});
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
},
//
async getInfo() {
const url = 'resident_analyze';
let url = '';
if (this.currentTab == '公共服务') {
url = 'people_res_view';
} else {
url = 'goods_res_view';
}
this.$refs.pieChart.showLoading();
const { data, code, msg } = await requestPostBi(
url,
@ -157,172 +163,33 @@ export default {
},
setPieData() {
const { currentTab, info } = this;
if (currentTab == '性别') {
this.pieData = [
{
value: info.male_count || 0,
type: 'male_count',
name: '男性'
},
{
value: info.female_count || 0,
type: 'female_count',
name: '女性'
}
];
} else if (currentTab == '户籍') {
this.pieData = [
{
value: info.local_count || 0,
type: 'local_count',
name: '本地户籍'
},
{
value: info.field_count || 0,
type: 'field_count',
name: '外地户籍'
}
];
} else if (currentTab == '人户状况') {
this.pieData = [
{
value: info.resi_y_house_y_count || 0,
type: 'resi_y_house_y_count',
name: '人户一致'
},
{
value: info.resi_y_house_n_count || 0,
type: 'resi_y_house_n_count',
name: '人在户不在'
},
{
value: info.resi_n_house_y_count || 0,
type: 'resi_n_house_y_count',
name: '户在人不在'
}
];
} else if (currentTab == '年龄') {
this.pieData = [
{
value: info.age50_count || 0,
type: 'age50_count',
name: '50岁以下'
},
{
value: info.age5059_count || 0,
type: 'age5059_count',
name: '50-59岁'
},
{
value: info.age6069_count || 0,
type: 'age6069_count',
name: '60-69岁'
},
{
value: info.age7079_count || 0,
type: 'age7079_count',
name: '70-79岁'
},
{
value: info.age80_count || 0,
type: 'age80_count',
name: '80岁以上'
}
];
} else if (currentTab == '志愿者类别') {
this.pieData = [
{
value: info.culture_count || 0,
type: 'culture_count',
name: '文化队伍'
},
{
value: info.committee_count || 0,
type: 'committee_count',
name: '楼委会'
},
{
value: info.capable_count || 0,
type: 'capable_count',
name: '能人达人'
},
{
value: info.friend_count || 0,
type: 'friend_count',
name: '老友俱乐部'
},
{
value: info.agent_count || 0,
type: 'agent_count',
name: '代办员'
},
{
value: info.mediator_count || 0,
type: 'mediator_count',
name: '调解员'
},
{
value: info.collector_count || 0,
type: 'collector_count',
name: '采集员'
},
{
value: info.security_count || 0,
type: 'security_count',
name: '治安巡逻员'
},
{
value: info.party_mem_count || 0,
type: 'party_mem_count',
name: '党员中心户'
}
];
} else if (currentTab == '党员文化程度') {
this.pieData = [
{
value: info.primary_count || 0,
type: 'primary_count',
name: '小学及文盲'
},
{
value: info.junior_high_count || 0,
type: 'junior_high_count',
name: '初中'
},
{
value: info.second_speci_count || 0,
type: 'second_speci_count',
name: '中专'
},
{
value: info.high_school_count || 0,
type: 'high_school_count',
name: '高中'
},
{
value: info.junior_college_count || 0,
type: 'junior_college_count',
name: '大专'
},
{
value: info.undergrad_count || 0,
type: 'undergrad_count',
name: '本科'
},
{
value: info.master_count || 0,
type: 'master_count',
name: '硕士'
},
{
value: info.doctor_count || 0,
type: 'doctor_count',
name: '博士'
}
];
} else if (currentTab == '下级人口分布') {
this.pieData = [];
}
let data = [
{
name: '江',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
},
{
name: '平',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 63
},
{
name: '究',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 66
},
{
name: '布',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
}
];
data = JSON.parse(JSON.stringify(data).replace(/count/g, 'value'));
console.log('data', data);
this.pieData = data;
this.iniPieChart();
},
//

42
src/views/dataBoard/sida/cpts/sqpj.vue

@ -45,13 +45,7 @@ export default {
pieOption: {},
pieInitState: false,
pieData: [],
tabList: [
'满意度',
'关注度',
'期盼度',
'烦心度'
// "",
],
tabList: ['满意度', '关注度', '期盼度', '烦心度'],
currentTab: '满意度',
info: {
male_count: 0,
@ -105,16 +99,16 @@ export default {
this.getResiCategoryData();
},
handleClickItem(item) {
const { type, name } = item;
this.$router.push({
path: '/dataBoard/renfang/resi-analyze',
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name
}
});
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
@ -126,8 +120,18 @@ export default {
});
},
async getResiCategoryData() {
console.log('=========================getResiCategoryData');
const url = 'resident_class_statics';
let url = '';
if (this.currentTab == '满意度') {
url = 'self_need_view';
} else if (this.currentTab == '关注度') {
url = 'attention_eval_view';
} else if (this.currentTab == '期盼度') {
url = 'self_need_view';
} else {
//
url = 'self_need_view';
}
const { data, code, msg } = await requestPostBi(
url,
{

466
src/views/dataBoard/sida/cpts/wtqd.vue

@ -1,10 +1,7 @@
<template>
<div class="m-wtqd">
<div class="tablist">
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]"
@click="currentTab = item">
{{ item }}
</div>
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]" @click="currentTab = item">{{ item }}</div>
</div>
<div class="pieMain">
<div class="legend">
@ -16,303 +13,198 @@
</div>
</div>
</div>
<div class="pie">
<screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame>
</div>
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame></div>
</div>
</div>
</template>
<script>
import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index";
import {
pieOption
} from "./wtqdPieOption.js";
import {
requestPostBi
} from "@/js/dai/request-bipass";
export default {
props: {
orgId: {
type: String,
default: "",
},
},
data() {
return {
showNoData: false,
timer: null,
pieChart: "",
pieOption: {},
pieInitState: false,
pieData: [],
tabList: ["治理事件", "安全隐患", "综治人群"
// "",
],
currentTab: "治理事件",
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0,
},
};
},
components: {
screenEchartsFrame,
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index';
import { pieOption } from './wtqdPieOption.js';
import { requestPostBi } from '@/js/dai/request-bipass';
export default {
props: {
orgId: {
type: String,
default: ''
}
},
data() {
return {
showNoData: false,
timer: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
tabList: [
'治理事件',
'安全隐患',
'综治人群'
// "",
],
currentTab: '治理事件',
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0
}
};
},
components: {
screenEchartsFrame
},
mounted() {
this.init();
},
watch: {
currentTab() {
this.setPieData();
},
mounted() {
orgId() {
this.init();
}
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
watch: {
currentTab() {
this.setPieData();
},
orgId() {
this.init();
},
handleClickItem(item) {
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
handleClickItem(item) {
const {
type,
name
} = item;
this.$router.push({
path: "/dataBoard/renfang/resi-analyze",
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name,
},
});
},
//
async getInfo() {
const url = "resident_analyze";
this.$refs.pieChart.showLoading();
const {
data,
code,
msg
} = await requestPostBi(url, {
//
async getInfo() {
let url = '';
if (this.currentTab == '治理事件') {
url = 'people_res_view';
} else if (this.currentTab == '安全隐患') {
url = 'goods_res_view';
} else {
url = 'people_res_view';
}
this.$refs.pieChart.showLoading();
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.orgId,
},
}, {
// mockId: 60041615,
});
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
org_id: this.orgId
}
} else {
this.$message.error(msg);
},
{
// mockId: 60041615,
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
element.sel = false;
}
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
);
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
}
} else {
this.$message.error(msg);
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
setTimeout(() => {
this.getPie();
}, 500);
element.sel = false;
}
},
setPieData() {
const {
currentTab,
info
} = this;
if (currentTab == "性别") {
this.pieData = [{
value: info.male_count || 0,
type: "male_count",
name: "男性",
}, {
value: info.female_count || 0,
type: "female_count",
name: "女性",
}, ];
} else if (currentTab == "户籍") {
this.pieData = [{
value: info.local_count || 0,
type: "local_count",
name: "本地户籍",
}, {
value: info.field_count || 0,
type: "field_count",
name: "外地户籍",
}, ];
} else if (currentTab == "人户状况") {
this.pieData = [{
value: info.resi_y_house_y_count || 0,
type: "resi_y_house_y_count",
name: "人户一致",
}, {
value: info.resi_y_house_n_count || 0,
type: "resi_y_house_n_count",
name: "人在户不在",
}, {
value: info.resi_n_house_y_count || 0,
type: "resi_n_house_y_count",
name: "户在人不在",
}, ];
} else if (currentTab == "年龄") {
this.pieData = [{
value: info.age50_count || 0,
type: "age50_count",
name: "50岁以下",
}, {
value: info.age5059_count || 0,
type: "age5059_count",
name: "50-59岁",
}, {
value: info.age6069_count || 0,
type: "age6069_count",
name: "60-69岁",
}, {
value: info.age7079_count || 0,
type: "age7079_count",
name: "70-79岁",
}, {
value: info.age80_count || 0,
type: "age80_count",
name: "80岁以上",
}, ];
} else if (currentTab == "志愿者类别") {
this.pieData = [{
value: info.culture_count || 0,
type: "culture_count",
name: "文化队伍",
}, {
value: info.committee_count || 0,
type: "committee_count",
name: "楼委会",
}, {
value: info.capable_count || 0,
type: "capable_count",
name: "能人达人",
}, {
value: info.friend_count || 0,
type: "friend_count",
name: "老友俱乐部",
}, {
value: info.agent_count || 0,
type: "agent_count",
name: "代办员",
}, {
value: info.mediator_count || 0,
type: "mediator_count",
name: "调解员",
}, {
value: info.collector_count || 0,
type: "collector_count",
name: "采集员",
}, {
value: info.security_count || 0,
type: "security_count",
name: "治安巡逻员",
}, {
value: info.party_mem_count || 0,
type: "party_mem_count",
name: "党员中心户",
}, ];
} else if (currentTab == "党员文化程度") {
this.pieData = [{
value: info.primary_count || 0,
type: "primary_count",
name: "小学及文盲",
}, {
value: info.junior_high_count || 0,
type: "junior_high_count",
name: "初中",
}, {
value: info.second_speci_count || 0,
type: "second_speci_count",
name: "中专",
}, {
value: info.high_school_count || 0,
type: "high_school_count",
name: "高中",
}, {
value: info.junior_college_count || 0,
type: "junior_college_count",
name: "大专",
}, {
value: info.undergrad_count || 0,
type: "undergrad_count",
name: "本科",
}, {
value: info.master_count || 0,
type: "master_count",
name: "硕士",
}, {
value: info.doctor_count || 0,
type: "doctor_count",
name: "博士",
}, ];
} else if (currentTab == "下级人口分布") {
this.pieData = [];
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
} else {
setTimeout(() => {
this.getPie();
}, 500);
}
},
setPieData() {
const { currentTab, info } = this;
let data = [
{
name: '江',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
},
{
name: '平',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 63
},
{
name: '究',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 66
},
{
name: '布',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
}
this.iniPieChart();
},
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
},
];
data = JSON.parse(JSON.stringify(data).replace(/count/g, 'value'));
console.log('data', data);
this.pieData = data;
this.iniPieChart();
},
};
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
}
}
};
</script>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>

463
src/views/dataBoard/sida/cpts/xqqd.vue

@ -1,10 +1,7 @@
<template>
<div class="m-xqqd">
<div class="tablist">
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]"
@click="currentTab = item">
{{ item }}
</div>
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]" @click="currentTab = item">{{ item }}</div>
</div>
<div class="pieMain">
<div class="legend">
@ -16,304 +13,196 @@
</div>
</div>
</div>
<div class="pie">
<screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame>
</div>
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame></div>
</div>
</div>
</template>
<script>
import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index";
import {
pieOption
} from "./xqqdPieOption.js";
import {
requestPostBi
} from "@/js/dai/request-bipass";
export default {
props: {
orgId: {
type: String,
default: "",
},
},
data() {
return {
showNoData: false,
timer: null,
pieChart: "",
pieOption: {},
pieInitState: false,
pieData: [],
tabList: ["个性需求", "共性需求"
// "",
],
currentTab: "个性需求",
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0,
},
};
},
components: {
screenEchartsFrame,
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index';
import { pieOption } from './xqqdPieOption.js';
import { requestPostBi } from '@/js/dai/request-bipass';
export default {
props: {
orgId: {
type: String,
default: ''
}
},
data() {
return {
showNoData: false,
timer: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
tabList: [
'个性需求',
'共性需求'
// "",
],
currentTab: '个性需求',
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0
}
};
},
components: {
screenEchartsFrame
},
mounted() {
this.init();
},
watch: {
currentTab() {
this.setPieData();
},
mounted() {
orgId() {
this.init();
}
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
watch: {
currentTab() {
this.setPieData();
},
orgId() {
this.init();
},
handleClickItem(item) {
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
handleClickItem(item) {
const {
type,
name
} = item;
this.$router.push({
path: "/dataBoard/renfang/resi-analyze",
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name,
},
});
},
//
async getInfo() {
const url = "resident_analyze";
this.$refs.pieChart.showLoading();
const {
data,
code,
msg
} = await requestPostBi(url, {
//
async getInfo() {
let url = '';
if (this.currentTab == '个性需求') {
url = 'self_need_view';
} else {
url = 'common_need_view';
}
this.$refs.pieChart.showLoading();
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.orgId,
},
}, {
// mockId: 60041615,
});
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
org_id: this.orgId
}
} else {
this.$message.error(msg);
},
{
// mockId: 60041615,
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
element.sel = false;
}
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
);
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
}
} else {
this.$message.error(msg);
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
setTimeout(() => {
this.getPie();
}, 500);
element.sel = false;
}
},
setPieData() {
const {
currentTab,
info
} = this;
if (currentTab == "性别") {
this.pieData = [{
value: info.male_count || 0,
type: "male_count",
name: "男性",
}, {
value: info.female_count || 0,
type: "female_count",
name: "女性",
}, ];
} else if (currentTab == "户籍") {
this.pieData = [{
value: info.local_count || 0,
type: "local_count",
name: "本地户籍",
}, {
value: info.field_count || 0,
type: "field_count",
name: "外地户籍",
}, ];
} else if (currentTab == "人户状况") {
this.pieData = [{
value: info.resi_y_house_y_count || 0,
type: "resi_y_house_y_count",
name: "人户一致",
}, {
value: info.resi_y_house_n_count || 0,
type: "resi_y_house_n_count",
name: "人在户不在",
}, {
value: info.resi_n_house_y_count || 0,
type: "resi_n_house_y_count",
name: "户在人不在",
}, ];
} else if (currentTab == "年龄") {
this.pieData = [{
value: info.age50_count || 0,
type: "age50_count",
name: "50岁以下",
}, {
value: info.age5059_count || 0,
type: "age5059_count",
name: "50-59岁",
}, {
value: info.age6069_count || 0,
type: "age6069_count",
name: "60-69岁",
}, {
value: info.age7079_count || 0,
type: "age7079_count",
name: "70-79岁",
}, {
value: info.age80_count || 0,
type: "age80_count",
name: "80岁以上",
}, ];
} else if (currentTab == "志愿者类别") {
this.pieData = [{
value: info.culture_count || 0,
type: "culture_count",
name: "文化队伍",
}, {
value: info.committee_count || 0,
type: "committee_count",
name: "楼委会",
}, {
value: info.capable_count || 0,
type: "capable_count",
name: "能人达人",
}, {
value: info.friend_count || 0,
type: "friend_count",
name: "老友俱乐部",
}, {
value: info.agent_count || 0,
type: "agent_count",
name: "代办员",
}, {
value: info.mediator_count || 0,
type: "mediator_count",
name: "调解员",
}, {
value: info.collector_count || 0,
type: "collector_count",
name: "采集员",
}, {
value: info.security_count || 0,
type: "security_count",
name: "治安巡逻员",
}, {
value: info.party_mem_count || 0,
type: "party_mem_count",
name: "党员中心户",
}, ];
} else if (currentTab == "党员文化程度") {
this.pieData = [{
value: info.primary_count || 0,
type: "primary_count",
name: "小学及文盲",
}, {
value: info.junior_high_count || 0,
type: "junior_high_count",
name: "初中",
}, {
value: info.second_speci_count || 0,
type: "second_speci_count",
name: "中专",
}, {
value: info.high_school_count || 0,
type: "high_school_count",
name: "高中",
}, {
value: info.junior_college_count || 0,
type: "junior_college_count",
name: "大专",
}, {
value: info.undergrad_count || 0,
type: "undergrad_count",
name: "本科",
}, {
value: info.master_count || 0,
type: "master_count",
name: "硕士",
}, {
value: info.doctor_count || 0,
type: "doctor_count",
name: "博士",
}, ];
} else if (currentTab == "下级人口分布") {
this.pieData = [];
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
} else {
setTimeout(() => {
this.getPie();
}, 500);
}
},
setPieData() {
const { currentTab, info } = this;
let data = [
{
name: '江',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
},
{
name: '平',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 63
},
{
name: '究',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 66
},
{
name: '布',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
}
this.iniPieChart();
},
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
},
];
data = JSON.parse(JSON.stringify(data).replace(/count/g, 'value'));
console.log('data', data);
this.pieData = data;
this.iniPieChart();
},
};
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
}
}
};
</script>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>

468
src/views/dataBoard/sida/cpts/zyqd.vue

@ -1,10 +1,7 @@
<template>
<div class="m-zyqd">
<div class="tablist">
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]"
@click="currentTab = item">
{{ item }}
</div>
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]" @click="currentTab = item">{{ item }}</div>
</div>
<div class="pieMain">
<div class="legend">
@ -16,304 +13,199 @@
</div>
</div>
</div>
<div class="pie">
<screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame>
</div>
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame></div>
</div>
</div>
</template>
<script>
import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index";
import {
pieOption
} from "./fwqdPieOption.js";
import {
requestPostBi
} from "@/js/dai/request-bipass";
export default {
props: {
orgId: {
type: String,
default: "",
},
},
data() {
return {
showNoData: false,
timer: null,
pieChart: "",
pieOption: {},
pieInitState: false,
pieData: [],
tabList: ["人资源", "物资源", "场所资源"
// "",
],
currentTab: "人资源",
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0,
},
};
},
components: {
screenEchartsFrame,
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index';
import { pieOption } from './fwqdPieOption.js';
import { requestPostBi } from '@/js/dai/request-bipass';
export default {
props: {
orgId: {
type: String,
default: ''
}
},
data() {
return {
showNoData: false,
timer: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
tabList: [
'人资源',
'物资源',
'场所资源'
// "",
],
currentTab: '人资源',
info: {
male_count: 0,
female_count: 0,
resi_y_house_y_count: 0,
resi_y_house_n_count: 0,
resi_n_house_y_count: 0,
primary_count: 0,
junior_high_count: 0,
second_speci_count: 0,
high_school_count: 0,
junior_college_count: 0,
undergrad_count: 0,
master_count: 0,
doctor_count: 0,
local_count: 0,
field_count: 0,
age50_count: 0,
age5059_count: 0,
age6069_count: 0,
age7079_count: 0,
age80_count: 0,
culture_count: 0,
committee_count: 0,
capable_count: 0,
friend_count: 0,
agent_count: 0,
mediator_count: 0,
collector_count: 0,
security_count: 0,
party_mem_count: 0
}
};
},
components: {
screenEchartsFrame
},
mounted() {
this.init();
},
watch: {
currentTab() {
this.setPieData();
},
mounted() {
orgId() {
this.init();
}
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
watch: {
currentTab() {
this.setPieData();
},
orgId() {
this.init();
},
handleClickItem(item) {
// const { type, name } = item;
// this.$router.push({
// path: '/dataBoard/renfang/resi-analyze',
// query: {
// org_id: this.orgId,
// type,
// type_category: this.currentTab,
// type_name: name
// }
// });
},
methods: {
async init() {
await this.getInfo();
this.getPie();
},
handleClickItem(item) {
const {
type,
name
} = item;
this.$router.push({
path: "/dataBoard/renfang/resi-analyze",
query: {
org_id: this.orgId,
type,
type_category: this.currentTab,
type_name: name,
},
});
},
//
async getInfo() {
const url = "resident_analyze";
this.$refs.pieChart.showLoading();
const {
data,
code,
msg
} = await requestPostBi(url, {
//
async getInfo() {
let url = '';
if (this.currentTab == '人资源') {
url = 'people_res_view';
} else if (this.currentTab == '物资源') {
url = 'goods_res_view';
}else{
url = 'people_res_view';
}
this.$refs.pieChart.showLoading();
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.orgId,
},
}, {
// mockId: 60041615,
});
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
org_id: this.orgId
}
} else {
this.$message.error(msg);
},
{
// mockId: 60041615,
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
element.sel = false;
}
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
);
this.$refs.pieChart.hideLoading();
if (code === 0) {
if (data && Array.isArray(data) && data.length > 0) {
let info = data[0];
this.info = {
...this.info,
...info
};
}
} else {
this.$message.error(msg);
}
},
selItem(selItem, selIndex) {
this.tabList.forEach((element, index) => {
if (index === selIndex) {
element.sel = true;
} else {
setTimeout(() => {
this.getPie();
}, 500);
element.sel = false;
}
},
setPieData() {
const {
currentTab,
info
} = this;
if (currentTab == "性别") {
this.pieData = [{
value: info.male_count || 0,
type: "male_count",
name: "男性",
}, {
value: info.female_count || 0,
type: "female_count",
name: "女性",
}, ];
} else if (currentTab == "户籍") {
this.pieData = [{
value: info.local_count || 0,
type: "local_count",
name: "本地户籍",
}, {
value: info.field_count || 0,
type: "field_count",
name: "外地户籍",
}, ];
} else if (currentTab == "人户状况") {
this.pieData = [{
value: info.resi_y_house_y_count || 0,
type: "resi_y_house_y_count",
name: "人户一致",
}, {
value: info.resi_y_house_n_count || 0,
type: "resi_y_house_n_count",
name: "人在户不在",
}, {
value: info.resi_n_house_y_count || 0,
type: "resi_n_house_y_count",
name: "户在人不在",
}, ];
} else if (currentTab == "年龄") {
this.pieData = [{
value: info.age50_count || 0,
type: "age50_count",
name: "50岁以下",
}, {
value: info.age5059_count || 0,
type: "age5059_count",
name: "50-59岁",
}, {
value: info.age6069_count || 0,
type: "age6069_count",
name: "60-69岁",
}, {
value: info.age7079_count || 0,
type: "age7079_count",
name: "70-79岁",
}, {
value: info.age80_count || 0,
type: "age80_count",
name: "80岁以上",
}, ];
} else if (currentTab == "志愿者类别") {
this.pieData = [{
value: info.culture_count || 0,
type: "culture_count",
name: "文化队伍",
}, {
value: info.committee_count || 0,
type: "committee_count",
name: "楼委会",
}, {
value: info.capable_count || 0,
type: "capable_count",
name: "能人达人",
}, {
value: info.friend_count || 0,
type: "friend_count",
name: "老友俱乐部",
}, {
value: info.agent_count || 0,
type: "agent_count",
name: "代办员",
}, {
value: info.mediator_count || 0,
type: "mediator_count",
name: "调解员",
}, {
value: info.collector_count || 0,
type: "collector_count",
name: "采集员",
}, {
value: info.security_count || 0,
type: "security_count",
name: "治安巡逻员",
}, {
value: info.party_mem_count || 0,
type: "party_mem_count",
name: "党员中心户",
}, ];
} else if (currentTab == "党员文化程度") {
this.pieData = [{
value: info.primary_count || 0,
type: "primary_count",
name: "小学及文盲",
}, {
value: info.junior_high_count || 0,
type: "junior_high_count",
name: "初中",
}, {
value: info.second_speci_count || 0,
type: "second_speci_count",
name: "中专",
}, {
value: info.high_school_count || 0,
type: "high_school_count",
name: "高中",
}, {
value: info.junior_college_count || 0,
type: "junior_college_count",
name: "大专",
}, {
value: info.undergrad_count || 0,
type: "undergrad_count",
name: "本科",
}, {
value: info.master_count || 0,
type: "master_count",
name: "硕士",
}, {
value: info.doctor_count || 0,
type: "doctor_count",
name: "博士",
}, ];
} else if (currentTab == "下级人口分布") {
this.pieData = [];
});
},
pieInitOk() {
this.pieInitState = true;
},
getPie() {
if (this.pieInitState) {
this.setPieData();
} else {
setTimeout(() => {
this.getPie();
}, 500);
}
},
setPieData() {
const { currentTab, info } = this;
let data = [
{
name: '江',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
},
{
name: '平',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 63
},
{
name: '究',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 66
},
{
name: '布',
org_id: '7b6f9a9f9f38d5f9fa7ce94a93d6eb28',
count: 61
}
this.iniPieChart();
},
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
},
];
data = JSON.parse(JSON.stringify(data).replace(/count/g, 'value'));
console.log('data', data);
this.pieData = data;
this.iniPieChart();
},
};
//
async iniPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
}
}
};
</script>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>

710
src/views/dataBoard/sida/index.vue

@ -8,31 +8,38 @@
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">需求清单</div>
</div>
<div class="m-subbox"><xqqd :orgId="orgData.org_id"></xqqd></div>
<div class="m-subbox">
<xqqd :orgId="orgData.org_id"></xqqd>
</div>
</div>
<div class="m-box">
<div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">问题清单</div>
</div>
<div class="m-subbox"><wtqd :orgId="orgData.org_id"></wtqd></div>
<div class="m-subbox">
<wtqd :orgId="orgData.org_id"></wtqd>
</div>
</div>
</div>
<div class="g-center">
<div class="m-map">
<div class="m-search2">
<el-date-picker type="daterange" range-separator="" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-button type="primary" >查询</el-button>
<el-date-picker type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
<el-button type="primary">查询</el-button>
</div>
<grid-map ref="map" @clickAgency="clickAgencyItem" :srcGridData="orgData" @clickDotBtn="handleClickDotBtn" />
<grid-map ref="map" @clickAgency="clickAgencyItem" :srcGridData="orgData"
@clickDotBtn="handleClickDotBtn" />
</div>
<div class="m-box ">
<div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-800.png" class="box-title-bg" />
<div class="box-title-txt" v-if="!displayedForecast">社区评价</div>
</div>
<div class="m-subbox"><sqpj :orgId="orgData.org_id"></sqpj></div>
<div class="m-subbox">
<sqpj :orgId="orgData.org_id"></sqpj>
</div>
</div>
</div>
<div class="g-right">
@ -41,19 +48,18 @@
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">数字社区</div>
</div>
<div class="m-subbox "><szsq :orgId="orgData.org_id"></szsq></div>
<div class="m-subbox ">
<szsq :orgId="orgData.org_id"></szsq>
</div>
</div>
<div class="m-box">
<div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">服务清单</div>
</div>
<div
class="m-subbox "
:class="{
<div class="m-subbox " :class="{
'z-shrink': orgLevel == 'district' || orgLevel == 'street' || orgLevel == 'city'
}"
>
}">
<fwqd :orgId="orgData.org_id"></fwqd>
</div>
</div>
@ -62,7 +68,9 @@
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">资源清单</div>
</div>
<div class="m-subbox"><zyqd :orgId="orgData.org_id"></zyqd></div>
<div class="m-subbox">
<zyqd :orgId="orgData.org_id"></zyqd>
</div>
</div>
</div>
<cpt-loading v-show="false" />
@ -72,381 +80,397 @@
</div>
</template>
<script>
import gridMap from '@/views/dataBoard/cpts/map/index';
import xqqd from '@/views/dataBoard/sida/cpts/xqqd';
import wtqd from '@/views/dataBoard/sida/cpts/wtqd';
import zyqd from '@/views/dataBoard/sida/cpts/zyqd';
import fwqd from '@/views/dataBoard/sida/cpts/fwqd';
import szsq from '@/views/dataBoard/sida/cpts/szsq';
import sqpj from '@/views/dataBoard/sida/cpts/sqpj';
import gridMap from '@/views/dataBoard/cpts/map/index';
import xqqd from '@/views/dataBoard/sida/cpts/xqqd';
import wtqd from '@/views/dataBoard/sida/cpts/wtqd';
import zyqd from '@/views/dataBoard/sida/cpts/zyqd';
import fwqd from '@/views/dataBoard/sida/cpts/fwqd';
import szsq from '@/views/dataBoard/sida/cpts/szsq';
import sqpj from '@/views/dataBoard/sida/cpts/sqpj';
import cptBread from '@/views/dataBoard/sida/cpts/bread';
import cptLoading from '@/views/dataBoard/cpts/loading';
import houseDetails from '@/views/dataBoard/cpts/house-details';
import resiDetails from '@/views/dataBoard/cpts/resi-details';
import {
requestPostBi
} from '@/js/dai/request-bipass';
import {
requestPost
} from '@/js/dai/request';
import getQueryPara from 'dai-js/modules/getQueryPara';
import cptBread from '@/views/dataBoard/sida/cpts/bread';
import cptLoading from '@/views/dataBoard/cpts/loading';
import houseDetails from '@/views/dataBoard/cpts/house-details';
import resiDetails from '@/views/dataBoard/cpts/resi-details';
import { requestPostBi } from '@/js/dai/request-bipass';
import { requestPost } from '@/js/dai/request';
import getQueryPara from 'dai-js/modules/getQueryPara';
function iniGetPerInfo() {
return {
unemployed_ratio: '--',
crowd_ratio: '--',
volunteer_ratio: '--',
month_update_ratio: '--',
aged_ratio: '--',
teenagers_ratio: '--'
};
}
export default {
name: 'renfang',
components: {
gridMap,
xqqd,
wtqd,
zyqd,
fwqd,
szsq,
sqpj,
cptLoading,
cptBread,
houseDetails,
resiDetails
},
data() {
function iniGetPerInfo() {
return {
loading: false,
orgData: {
children: []
}, //
orgId: '',
orgLevel: '',
breadList: [
{
unemployed_ratio: '--',
crowd_ratio: '--',
volunteer_ratio: '--',
month_update_ratio: '--',
aged_ratio: '--',
teenagers_ratio: '--'
};
}
export default {
name: 'renfang',
components: {
gridMap,
xqqd,
wtqd,
zyqd,
fwqd,
szsq,
sqpj,
cptLoading,
cptBread,
houseDetails,
resiDetails
},
data() {
return {
loading: false,
orgData: {
children: []
}, //
orgId: '',
orgLevel: '',
breadList: [{
orgId: '',
orgLevel: '',
meta: {
title: '人房总览'
}
}],
resiCategoryData: [], //
resiCategoryForecastData: [], //
displayedForecast: false, //
searchModule: {
displayedCard: false,
keyword: '',
resultTab: '0', // 0 1234
result: [
// {
// id: 1,
// title: "",
// },
]
},
perInfo: iniGetPerInfo(),
displayedResiId: '',
displayedHouseId: ''
};
},
mounted() {
const queryOrgId = getQueryPara('orgId');
const queryOrgLevel = getQueryPara('orgLevel');
this.init(queryOrgId, queryOrgLevel);
},
watch: {},
methods: {
async init(queryOrgId, queryOrgLevel) {
if (queryOrgId) {
this.orgId = queryOrgId;
this.orgLevel = queryOrgLevel || 'agency';
} else {
this.orgId = this.$store.state.user.agencyId;
this.orgLevel = 'agency';
}
],
resiCategoryData: [], //
resiCategoryForecastData: [], //
displayedForecast: false, //
searchModule: {
displayedCard: false,
keyword: '',
resultTab: '0', // 0 1234
result: [
// {
// id: 1,
// title: "",
// },
]
//
this.loading = false;
// await this.loadOrgData();
await this.getMapData();
await this.getSubMapData();
this.getResiCategoryForecastData();
this.getPerInfo();
this.loading = true;
},
perInfo: iniGetPerInfo(),
displayedResiId: '',
displayedHouseId: ''
};
},
mounted() {
const queryOrgId = getQueryPara('orgId');
const queryOrgLevel = getQueryPara('orgLevel');
this.init(queryOrgId, queryOrgLevel);
},
watch: {},
methods: {
async init(queryOrgId, queryOrgLevel) {
if (queryOrgId) {
this.orgId = queryOrgId;
this.orgLevel = queryOrgLevel || 'agency';
} else {
this.orgId = this.$store.state.user.agencyId;
this.orgLevel = 'agency';
}
//
this.loading = false;
// await this.loadOrgData();
await this.getMapData();
await this.getSubMapData();
this.getResiCategoryForecastData();
this.getPerInfo();
this.loading = true;
},
toResiClassPage(type_id = '', type_name) {
this.$router.push({
path: '/dataBoard/renfang/resi-class',
query: {
org_id: this.orgId,
type_id,
type_name
toResiClassPage(type_id = '', type_name) {
this.$router.push({
path: '/dataBoard/renfang/resi-class',
query: {
org_id: this.orgId,
type_id,
type_name
}
});
},
handleClickDotBtn(type, info) {
console.log('handleClickDotBtn', type, info);
if (type == 'watch-resi') {
this.displayedResiId = info.user_id;
} else if (type == 'watch-house') {
this.displayedHouseId = info.house_id;
}
});
},
handleClickDotBtn(type, info) {
console.log('handleClickDotBtn', type, info);
if (type == 'watch-resi') {
this.displayedResiId = info.user_id;
} else if (type == 'watch-house') {
this.displayedHouseId = info.house_id;
}
},
clickBreadItem({ item }) {
this.toBread(item);
},
clickAgencyItem(item) {
console.log(item);
this.toBread({
orgId: item.id,
orgLevel: item.level,
meta: {
title: item.name
},
clickBreadItem({
item
}) {
this.toBread(item);
},
clickAgencyItem(item) {
console.log(item);
this.toBread({
orgId: item.id,
orgLevel: item.level,
meta: {
title: item.name
}
});
},
toBread(item) {
const {
orgId
} = item;
const {
breadList
} = this;
let index = breadList.findIndex(val => val.orgId === orgId);
// return console.log(item, breadList, index);
if (index >= 0) {
this.breadList = breadList.slice(0, index + 1);
} else {
breadList.push(item);
this.breadList = breadList;
}
});
},
toBread(item) {
const { orgId } = item;
const { breadList } = this;
let index = breadList.findIndex(val => val.orgId === orgId);
// return console.log(item, breadList, index);
if (index >= 0) {
this.breadList = breadList.slice(0, index + 1);
} else {
breadList.push(item);
this.breadList = breadList;
}
this.init(item.orgId, item.orgLevel);
},
//
handleClickSearchItem(item) {
console.log('handleClickSearchItem', item);
if (!item.longitude) {
return this.$message.error('请先设置坐标');
}
this.$refs.map.setDotMarker(item, [parseFloat(item.longitude), parseFloat(item.latitude)]);
},
//
async handleSearch() {
this.searchModule.result = [];
console.log(this.searchModule);
const { searchModule } = this;
const url = ['search_all', 'search_resident', 'search_village', 'search_building', 'search_house'][searchModule.resultTab];
const { data, code, msg } = await requestPostBi(
url,
{
this.init(item.orgId, item.orgLevel);
},
//
handleClickSearchItem(item) {
console.log('handleClickSearchItem', item);
if (!item.longitude) {
return this.$message.error('请先设置坐标');
}
this.$refs.map.setDotMarker(item, [parseFloat(item.longitude), parseFloat(item.latitude)]);
},
//
async handleSearch() {
this.searchModule.result = [];
console.log(this.searchModule);
const {
searchModule
} = this;
const url = ['search_all', 'search_resident', 'search_village', 'search_building', 'search_house'][
searchModule.resultTab
];
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId,
name: this.searchModule.keyword
}
},
{
}, {
// mockId: 60044224,
// mockId: 60048067,
}
);
if (code === 0) {
this.searchModule.result = data.map(item => {
let type = item.type || searchModule.resultTab;
let title = '';
let detailJson = {};
if (searchModule.resultTab == 0) {
title = item.name;
if (typeof item.detail_json == 'string') {
try {
detailJson = JSON.parse(item.detail_json);
} catch (e) {
console.log(e);
});
if (code === 0) {
this.searchModule.result = data.map(item => {
let type = item.type || searchModule.resultTab;
let title = '';
let detailJson = {};
if (searchModule.resultTab == 0) {
title = item.name;
if (typeof item.detail_json == 'string') {
try {
detailJson = JSON.parse(item.detail_json);
} catch (e) {
console.log(e);
}
}
} else if (type == '1') {
title = item.user_name;
} else if (type == '2') {
title = item.village_name;
} else if (type == '3') {
title = item.village_name + '-' + item.building_name;
} else if (type == '4') {
title = item.building + '-' + item.unit + '-' + item.door;
}
} else if (type == '1') {
title = item.user_name;
} else if (type == '2') {
title = item.village_name;
} else if (type == '3') {
title = item.village_name + '-' + item.building_name;
} else if (type == '4') {
title = item.building + '-' + item.unit + '-' + item.door;
}
return {
title,
type,
...detailJson,
...item
};
});
} else {
this.$message.error(msg);
}
},
// ps:
async getPerInfo() {
console.log('=========================getPerInfo');
const url = 'resident_ratio';
const { data, code, msg } = await requestPostBi(
url,
{
return {
title,
type,
...detailJson,
...item
};
});
} else {
this.$message.error(msg);
}
},
// ps:
async getPerInfo() {
console.log('=========================getPerInfo');
const url = 'resident_ratio';
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId
}
},
{
}, {
// mockId: 61167746,
});
if (code === 0) {
this.perInfo = {
...iniGetPerInfo(),
...data[0]
};
} else {
this.$message.error(msg);
}
);
if (code === 0) {
this.perInfo = {
...iniGetPerInfo(),
...data[0]
};
} else {
this.$message.error(msg);
}
},
//
async getResiCategoryData() {
console.log('=========================getResiCategoryData');
const url = 'resident_class_statics';
const { data, code, msg } = await requestPostBi(
url,
{
},
//
async getResiCategoryData() {
console.log('=========================getResiCategoryData');
const url = 'resident_class_statics';
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId
}
},
{
}, {
// mockId: 60031937,
}
);
if (code === 0) {
this.resiCategoryData = data.map(item => {
return {
code: item.label_id,
name: item.label,
count: item.count,
ratio: item.ratio,
growth: item.growth,
growthAbs: Math.abs(item.growth)
};
});
} else {
this.$message.error(msg);
}
},
//
async getResiCategoryForecastData() {
console.log('=========================getResiCategoryForecastData');
const url = 'resident_class_predict';
const { data, code, msg } = await requestPostBi(
url,
{
if (code === 0) {
this.resiCategoryData = data.map(item => {
return {
code: item.label_id,
name: item.label,
count: item.count,
ratio: item.ratio,
growth: item.growth,
growthAbs: Math.abs(item.growth)
};
});
} else {
this.$message.error(msg);
}
},
//
async getResiCategoryForecastData() {
console.log('=========================getResiCategoryForecastData');
const url = 'resident_class_predict';
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId
}
},
{
}, {
// mockId: 60064667,
}
);
if (code === 0) {
this.resiCategoryForecastData = data.map(item => {
return {
code: item.resident_type,
name: item.resident_type_name,
count: item.resident_count,
ratio: item.resident_ratio,
growth: item.change_count,
growthAbs: Math.abs(item.change_count)
};
});
} else {
this.$message.error(msg);
}
},
//
async getMapData() {
console.log('=========================getMapData');
const url = 'org_map';
const { data, code, msg } = await requestPostBi(
url,
{
if (code === 0) {
this.resiCategoryForecastData = data.map(item => {
return {
code: item.resident_type,
name: item.resident_type_name,
count: item.resident_count,
ratio: item.resident_ratio,
growth: item.change_count,
growthAbs: Math.abs(item.change_count)
};
});
} else {
this.$message.error(msg);
}
},
//
async getMapData() {
console.log('=========================getMapData');
const url = 'org_map';
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId
}
},
{
}, {
// mockId: 60810589,
});
if (code === 0) {
let info = data[0];
this.orgData = {
...info,
id: info.org_id,
name: info.org_name,
latitude: parseFloat(info.latitude),
longitude: parseFloat(info.longitude),
coordinates: info.coordinates || '',
children: []
};
this.orgId = this.orgData.org_id;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
}
);
if (code === 0) {
let info = data[0];
this.orgData = {
...info,
id: info.org_id,
name: info.org_name,
latitude: parseFloat(info.latitude),
longitude: parseFloat(info.longitude),
coordinates: info.coordinates || '',
children: []
};
this.orgId = this.orgData.org_id;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
}
},
//
async getSubMapData() {
console.log('=========================getSubMapData');
const url = 'sub_org_map';
const { data, code, msg } = await requestPostBi(
url,
{
},
//
async getSubMapData() {
console.log('=========================getSubMapData');
const url = 'sub_org_map';
const {
data,
code,
msg
} = await requestPostBi(url, {
queryParam: {
org_id: this.orgId
}
},
{
}, {
// mockId: 61831860,
}
);
if (code === 0) {
const { orgData } = this;
orgData.children = data.map(item => {
return {
...item,
id: item.org_id,
name: item.org_name,
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
coordinates: item.coordinates || ''
};
});
this.orgData = {
...orgData
if (code === 0) {
const {
orgData
} = this;
orgData.children = data.map(item => {
return {
...item,
id: item.org_id,
name: item.org_name,
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
coordinates: item.coordinates || ''
};
});
this.orgData = {
...orgData
};
console.log('==========================getSubMapData:result', this.orgData);
} else {
this.$message.error(msg);
}
},
//
async loadOrgData() {
const url = '/gov/org/agency/maporg';
let params = {
orgId: this.orgId,
level: this.orgLevel
};
console.log('==========================getSubMapData:result', this.orgData);
} else {
this.$message.error(msg);
}
},
//
async loadOrgData() {
const url = '/gov/org/agency/maporg';
let params = {
orgId: this.orgId,
level: this.orgLevel
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
const {
data,
code,
msg
} = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
}
}
}
}
};
};
</script>
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style>

Loading…
Cancel
Save